// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.30.2
// source: api/device_profile_template.proto

package api

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	DeviceProfileTemplateService_Create_FullMethodName = "/api.DeviceProfileTemplateService/Create"
	DeviceProfileTemplateService_Get_FullMethodName    = "/api.DeviceProfileTemplateService/Get"
	DeviceProfileTemplateService_Update_FullMethodName = "/api.DeviceProfileTemplateService/Update"
	DeviceProfileTemplateService_Delete_FullMethodName = "/api.DeviceProfileTemplateService/Delete"
	DeviceProfileTemplateService_List_FullMethodName   = "/api.DeviceProfileTemplateService/List"
)

// DeviceProfileTemplateServiceClient is the client API for DeviceProfileTemplateService 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.
//
// DeviceProfileTemplateService is the service providing API methods for managing device-profile templates.
type DeviceProfileTemplateServiceClient interface {
	// Create the given device-profile template.
	Create(ctx context.Context, in *CreateDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Get the device-profile template for the given ID.
	Get(ctx context.Context, in *GetDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*GetDeviceProfileTemplateResponse, error)
	// Update the given device-profile template.
	Update(ctx context.Context, in *UpdateDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Delete the device-profile template with the given ID.
	Delete(ctx context.Context, in *DeleteDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// List the available device-profile templates.
	List(ctx context.Context, in *ListDeviceProfileTemplatesRequest, opts ...grpc.CallOption) (*ListDeviceProfileTemplatesResponse, error)
}

type deviceProfileTemplateServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDeviceProfileTemplateServiceClient(cc grpc.ClientConnInterface) DeviceProfileTemplateServiceClient {
	return &deviceProfileTemplateServiceClient{cc}
}

func (c *deviceProfileTemplateServiceClient) Create(ctx context.Context, in *CreateDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, DeviceProfileTemplateService_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceProfileTemplateServiceClient) Get(ctx context.Context, in *GetDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*GetDeviceProfileTemplateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetDeviceProfileTemplateResponse)
	err := c.cc.Invoke(ctx, DeviceProfileTemplateService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceProfileTemplateServiceClient) Update(ctx context.Context, in *UpdateDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, DeviceProfileTemplateService_Update_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceProfileTemplateServiceClient) Delete(ctx context.Context, in *DeleteDeviceProfileTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, DeviceProfileTemplateService_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *deviceProfileTemplateServiceClient) List(ctx context.Context, in *ListDeviceProfileTemplatesRequest, opts ...grpc.CallOption) (*ListDeviceProfileTemplatesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListDeviceProfileTemplatesResponse)
	err := c.cc.Invoke(ctx, DeviceProfileTemplateService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DeviceProfileTemplateServiceServer is the server API for DeviceProfileTemplateService service.
// All implementations must embed UnimplementedDeviceProfileTemplateServiceServer
// for forward compatibility.
//
// DeviceProfileTemplateService is the service providing API methods for managing device-profile templates.
type DeviceProfileTemplateServiceServer interface {
	// Create the given device-profile template.
	Create(context.Context, *CreateDeviceProfileTemplateRequest) (*emptypb.Empty, error)
	// Get the device-profile template for the given ID.
	Get(context.Context, *GetDeviceProfileTemplateRequest) (*GetDeviceProfileTemplateResponse, error)
	// Update the given device-profile template.
	Update(context.Context, *UpdateDeviceProfileTemplateRequest) (*emptypb.Empty, error)
	// Delete the device-profile template with the given ID.
	Delete(context.Context, *DeleteDeviceProfileTemplateRequest) (*emptypb.Empty, error)
	// List the available device-profile templates.
	List(context.Context, *ListDeviceProfileTemplatesRequest) (*ListDeviceProfileTemplatesResponse, error)
	mustEmbedUnimplementedDeviceProfileTemplateServiceServer()
}

// UnimplementedDeviceProfileTemplateServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDeviceProfileTemplateServiceServer struct{}

func (UnimplementedDeviceProfileTemplateServiceServer) Create(context.Context, *CreateDeviceProfileTemplateRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDeviceProfileTemplateServiceServer) Get(context.Context, *GetDeviceProfileTemplateRequest) (*GetDeviceProfileTemplateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDeviceProfileTemplateServiceServer) Update(context.Context, *UpdateDeviceProfileTemplateRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDeviceProfileTemplateServiceServer) Delete(context.Context, *DeleteDeviceProfileTemplateRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDeviceProfileTemplateServiceServer) List(context.Context, *ListDeviceProfileTemplatesRequest) (*ListDeviceProfileTemplatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedDeviceProfileTemplateServiceServer) mustEmbedUnimplementedDeviceProfileTemplateServiceServer() {
}
func (UnimplementedDeviceProfileTemplateServiceServer) testEmbeddedByValue() {}

// UnsafeDeviceProfileTemplateServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DeviceProfileTemplateServiceServer will
// result in compilation errors.
type UnsafeDeviceProfileTemplateServiceServer interface {
	mustEmbedUnimplementedDeviceProfileTemplateServiceServer()
}

func RegisterDeviceProfileTemplateServiceServer(s grpc.ServiceRegistrar, srv DeviceProfileTemplateServiceServer) {
	// If the following call pancis, it indicates UnimplementedDeviceProfileTemplateServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&DeviceProfileTemplateService_ServiceDesc, srv)
}

func _DeviceProfileTemplateService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateDeviceProfileTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceProfileTemplateServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeviceProfileTemplateService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceProfileTemplateServiceServer).Create(ctx, req.(*CreateDeviceProfileTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceProfileTemplateService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDeviceProfileTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceProfileTemplateServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeviceProfileTemplateService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceProfileTemplateServiceServer).Get(ctx, req.(*GetDeviceProfileTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceProfileTemplateService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateDeviceProfileTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceProfileTemplateServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeviceProfileTemplateService_Update_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceProfileTemplateServiceServer).Update(ctx, req.(*UpdateDeviceProfileTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceProfileTemplateService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteDeviceProfileTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceProfileTemplateServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeviceProfileTemplateService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceProfileTemplateServiceServer).Delete(ctx, req.(*DeleteDeviceProfileTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeviceProfileTemplateService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListDeviceProfileTemplatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeviceProfileTemplateServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeviceProfileTemplateService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeviceProfileTemplateServiceServer).List(ctx, req.(*ListDeviceProfileTemplatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DeviceProfileTemplateService_ServiceDesc is the grpc.ServiceDesc for DeviceProfileTemplateService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeviceProfileTemplateService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.DeviceProfileTemplateService",
	HandlerType: (*DeviceProfileTemplateServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _DeviceProfileTemplateService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _DeviceProfileTemplateService_Get_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _DeviceProfileTemplateService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _DeviceProfileTemplateService_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _DeviceProfileTemplateService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/device_profile_template.proto",
}
