//  Copyright 2026 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.6.1
// - protoc             v4.25.3
// source: atelet.proto

package ateletpb

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	AteomHerder_Run_FullMethodName        = "/atelet.AteomHerder/Run"
	AteomHerder_Checkpoint_FullMethodName = "/atelet.AteomHerder/Checkpoint"
	AteomHerder_Restore_FullMethodName    = "/atelet.AteomHerder/Restore"
)

// AteomHerderClient is the client API for AteomHerder 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 AteomHerderClient interface {
	// Run tells atelet to create a new containerized workload from scratch on an
	// ateom.
	Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
	// Checkpoint tells atelet to save the current state of the workload on an
	// ateom to object storage, and then completely reset the ateom to a blank state
	// (back to "available" state.)
	Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error)
	// Restore restores a workload from checkpoint onto an ateom.
	Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error)
}

type ateomHerderClient struct {
	cc grpc.ClientConnInterface
}

func NewAteomHerderClient(cc grpc.ClientConnInterface) AteomHerderClient {
	return &ateomHerderClient{cc}
}

func (c *ateomHerderClient) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RunResponse)
	err := c.cc.Invoke(ctx, AteomHerder_Run_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ateomHerderClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CheckpointResponse)
	err := c.cc.Invoke(ctx, AteomHerder_Checkpoint_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ateomHerderClient) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RestoreResponse)
	err := c.cc.Invoke(ctx, AteomHerder_Restore_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AteomHerderServer is the server API for AteomHerder service.
// All implementations must embed UnimplementedAteomHerderServer
// for forward compatibility.
type AteomHerderServer interface {
	// Run tells atelet to create a new containerized workload from scratch on an
	// ateom.
	Run(context.Context, *RunRequest) (*RunResponse, error)
	// Checkpoint tells atelet to save the current state of the workload on an
	// ateom to object storage, and then completely reset the ateom to a blank state
	// (back to "available" state.)
	Checkpoint(context.Context, *CheckpointRequest) (*CheckpointResponse, error)
	// Restore restores a workload from checkpoint onto an ateom.
	Restore(context.Context, *RestoreRequest) (*RestoreResponse, error)
	mustEmbedUnimplementedAteomHerderServer()
}

// UnimplementedAteomHerderServer 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 UnimplementedAteomHerderServer struct{}

func (UnimplementedAteomHerderServer) Run(context.Context, *RunRequest) (*RunResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Run not implemented")
}
func (UnimplementedAteomHerderServer) Checkpoint(context.Context, *CheckpointRequest) (*CheckpointResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Checkpoint not implemented")
}
func (UnimplementedAteomHerderServer) Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Restore not implemented")
}
func (UnimplementedAteomHerderServer) mustEmbedUnimplementedAteomHerderServer() {}
func (UnimplementedAteomHerderServer) testEmbeddedByValue()                     {}

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

func RegisterAteomHerderServer(s grpc.ServiceRegistrar, srv AteomHerderServer) {
	// If the following call panics, it indicates UnimplementedAteomHerderServer 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(&AteomHerder_ServiceDesc, srv)
}

func _AteomHerder_Run_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RunRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AteomHerderServer).Run(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AteomHerder_Run_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AteomHerderServer).Run(ctx, req.(*RunRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AteomHerder_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CheckpointRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AteomHerderServer).Checkpoint(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AteomHerder_Checkpoint_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AteomHerderServer).Checkpoint(ctx, req.(*CheckpointRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AteomHerder_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RestoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AteomHerderServer).Restore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AteomHerder_Restore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AteomHerderServer).Restore(ctx, req.(*RestoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AteomHerder_ServiceDesc is the grpc.ServiceDesc for AteomHerder service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AteomHerder_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "atelet.AteomHerder",
	HandlerType: (*AteomHerderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Run",
			Handler:    _AteomHerder_Run_Handler,
		},
		{
			MethodName: "Checkpoint",
			Handler:    _AteomHerder_Checkpoint_Handler,
		},
		{
			MethodName: "Restore",
			Handler:    _AteomHerder_Restore_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "atelet.proto",
}
