// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/api/cloudquotas/v1beta/cloudquotas.proto package cloudquotaspb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( CloudQuotas_ListQuotaInfos_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/ListQuotaInfos" CloudQuotas_GetQuotaInfo_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/GetQuotaInfo" CloudQuotas_ListQuotaPreferences_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/ListQuotaPreferences" CloudQuotas_GetQuotaPreference_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/GetQuotaPreference" CloudQuotas_CreateQuotaPreference_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/CreateQuotaPreference" CloudQuotas_UpdateQuotaPreference_FullMethodName = "/google.api.cloudquotas.v1beta.CloudQuotas/UpdateQuotaPreference" ) // CloudQuotasClient is the client API for CloudQuotas service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type CloudQuotasClient interface { // Lists QuotaInfos of all quotas for a given project, folder or organization. ListQuotaInfos(ctx context.Context, in *ListQuotaInfosRequest, opts ...grpc.CallOption) (*ListQuotaInfosResponse, error) // Retrieve the QuotaInfo of a quota for a project, folder or organization. GetQuotaInfo(ctx context.Context, in *GetQuotaInfoRequest, opts ...grpc.CallOption) (*QuotaInfo, error) // Lists QuotaPreferences in a given project, folder or organization. ListQuotaPreferences(ctx context.Context, in *ListQuotaPreferencesRequest, opts ...grpc.CallOption) (*ListQuotaPreferencesResponse, error) // Gets details of a single QuotaPreference. GetQuotaPreference(ctx context.Context, in *GetQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) // Creates a new QuotaPreference that declares the desired value for a quota. CreateQuotaPreference(ctx context.Context, in *CreateQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) // Updates the parameters of a single QuotaPreference. It can updates the // config in any states, not just the ones pending approval. UpdateQuotaPreference(ctx context.Context, in *UpdateQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) } type cloudQuotasClient struct { cc grpc.ClientConnInterface } func NewCloudQuotasClient(cc grpc.ClientConnInterface) CloudQuotasClient { return &cloudQuotasClient{cc} } func (c *cloudQuotasClient) ListQuotaInfos(ctx context.Context, in *ListQuotaInfosRequest, opts ...grpc.CallOption) (*ListQuotaInfosResponse, error) { out := new(ListQuotaInfosResponse) err := c.cc.Invoke(ctx, CloudQuotas_ListQuotaInfos_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudQuotasClient) GetQuotaInfo(ctx context.Context, in *GetQuotaInfoRequest, opts ...grpc.CallOption) (*QuotaInfo, error) { out := new(QuotaInfo) err := c.cc.Invoke(ctx, CloudQuotas_GetQuotaInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudQuotasClient) ListQuotaPreferences(ctx context.Context, in *ListQuotaPreferencesRequest, opts ...grpc.CallOption) (*ListQuotaPreferencesResponse, error) { out := new(ListQuotaPreferencesResponse) err := c.cc.Invoke(ctx, CloudQuotas_ListQuotaPreferences_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudQuotasClient) GetQuotaPreference(ctx context.Context, in *GetQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) { out := new(QuotaPreference) err := c.cc.Invoke(ctx, CloudQuotas_GetQuotaPreference_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudQuotasClient) CreateQuotaPreference(ctx context.Context, in *CreateQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) { out := new(QuotaPreference) err := c.cc.Invoke(ctx, CloudQuotas_CreateQuotaPreference_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *cloudQuotasClient) UpdateQuotaPreference(ctx context.Context, in *UpdateQuotaPreferenceRequest, opts ...grpc.CallOption) (*QuotaPreference, error) { out := new(QuotaPreference) err := c.cc.Invoke(ctx, CloudQuotas_UpdateQuotaPreference_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CloudQuotasServer is the server API for CloudQuotas service. // All implementations should embed UnimplementedCloudQuotasServer // for forward compatibility type CloudQuotasServer interface { // Lists QuotaInfos of all quotas for a given project, folder or organization. ListQuotaInfos(context.Context, *ListQuotaInfosRequest) (*ListQuotaInfosResponse, error) // Retrieve the QuotaInfo of a quota for a project, folder or organization. GetQuotaInfo(context.Context, *GetQuotaInfoRequest) (*QuotaInfo, error) // Lists QuotaPreferences in a given project, folder or organization. ListQuotaPreferences(context.Context, *ListQuotaPreferencesRequest) (*ListQuotaPreferencesResponse, error) // Gets details of a single QuotaPreference. GetQuotaPreference(context.Context, *GetQuotaPreferenceRequest) (*QuotaPreference, error) // Creates a new QuotaPreference that declares the desired value for a quota. CreateQuotaPreference(context.Context, *CreateQuotaPreferenceRequest) (*QuotaPreference, error) // Updates the parameters of a single QuotaPreference. It can updates the // config in any states, not just the ones pending approval. UpdateQuotaPreference(context.Context, *UpdateQuotaPreferenceRequest) (*QuotaPreference, error) } // UnimplementedCloudQuotasServer should be embedded to have forward compatible implementations. type UnimplementedCloudQuotasServer struct { } func (UnimplementedCloudQuotasServer) ListQuotaInfos(context.Context, *ListQuotaInfosRequest) (*ListQuotaInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListQuotaInfos not implemented") } func (UnimplementedCloudQuotasServer) GetQuotaInfo(context.Context, *GetQuotaInfoRequest) (*QuotaInfo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQuotaInfo not implemented") } func (UnimplementedCloudQuotasServer) ListQuotaPreferences(context.Context, *ListQuotaPreferencesRequest) (*ListQuotaPreferencesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListQuotaPreferences not implemented") } func (UnimplementedCloudQuotasServer) GetQuotaPreference(context.Context, *GetQuotaPreferenceRequest) (*QuotaPreference, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQuotaPreference not implemented") } func (UnimplementedCloudQuotasServer) CreateQuotaPreference(context.Context, *CreateQuotaPreferenceRequest) (*QuotaPreference, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateQuotaPreference not implemented") } func (UnimplementedCloudQuotasServer) UpdateQuotaPreference(context.Context, *UpdateQuotaPreferenceRequest) (*QuotaPreference, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateQuotaPreference not implemented") } // UnsafeCloudQuotasServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CloudQuotasServer will // result in compilation errors. type UnsafeCloudQuotasServer interface { mustEmbedUnimplementedCloudQuotasServer() } func RegisterCloudQuotasServer(s grpc.ServiceRegistrar, srv CloudQuotasServer) { s.RegisterService(&CloudQuotas_ServiceDesc, srv) } func _CloudQuotas_ListQuotaInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListQuotaInfosRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).ListQuotaInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_ListQuotaInfos_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).ListQuotaInfos(ctx, req.(*ListQuotaInfosRequest)) } return interceptor(ctx, in, info, handler) } func _CloudQuotas_GetQuotaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetQuotaInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).GetQuotaInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_GetQuotaInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).GetQuotaInfo(ctx, req.(*GetQuotaInfoRequest)) } return interceptor(ctx, in, info, handler) } func _CloudQuotas_ListQuotaPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListQuotaPreferencesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).ListQuotaPreferences(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_ListQuotaPreferences_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).ListQuotaPreferences(ctx, req.(*ListQuotaPreferencesRequest)) } return interceptor(ctx, in, info, handler) } func _CloudQuotas_GetQuotaPreference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetQuotaPreferenceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).GetQuotaPreference(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_GetQuotaPreference_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).GetQuotaPreference(ctx, req.(*GetQuotaPreferenceRequest)) } return interceptor(ctx, in, info, handler) } func _CloudQuotas_CreateQuotaPreference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateQuotaPreferenceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).CreateQuotaPreference(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_CreateQuotaPreference_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).CreateQuotaPreference(ctx, req.(*CreateQuotaPreferenceRequest)) } return interceptor(ctx, in, info, handler) } func _CloudQuotas_UpdateQuotaPreference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateQuotaPreferenceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CloudQuotasServer).UpdateQuotaPreference(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CloudQuotas_UpdateQuotaPreference_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CloudQuotasServer).UpdateQuotaPreference(ctx, req.(*UpdateQuotaPreferenceRequest)) } return interceptor(ctx, in, info, handler) } // CloudQuotas_ServiceDesc is the grpc.ServiceDesc for CloudQuotas service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CloudQuotas_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.api.cloudquotas.v1beta.CloudQuotas", HandlerType: (*CloudQuotasServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListQuotaInfos", Handler: _CloudQuotas_ListQuotaInfos_Handler, }, { MethodName: "GetQuotaInfo", Handler: _CloudQuotas_GetQuotaInfo_Handler, }, { MethodName: "ListQuotaPreferences", Handler: _CloudQuotas_ListQuotaPreferences_Handler, }, { MethodName: "GetQuotaPreference", Handler: _CloudQuotas_GetQuotaPreference_Handler, }, { MethodName: "CreateQuotaPreference", Handler: _CloudQuotas_CreateQuotaPreference_Handler, }, { MethodName: "UpdateQuotaPreference", Handler: _CloudQuotas_UpdateQuotaPreference_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/api/cloudquotas/v1beta/cloudquotas.proto", }