// 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/cloud/confidentialcomputing/v1/service.proto

package confidentialcomputingpb

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 (
	ConfidentialComputing_CreateChallenge_FullMethodName         = "/google.cloud.confidentialcomputing.v1.ConfidentialComputing/CreateChallenge"
	ConfidentialComputing_VerifyAttestation_FullMethodName       = "/google.cloud.confidentialcomputing.v1.ConfidentialComputing/VerifyAttestation"
	ConfidentialComputing_VerifyConfidentialSpace_FullMethodName = "/google.cloud.confidentialcomputing.v1.ConfidentialComputing/VerifyConfidentialSpace"
	ConfidentialComputing_VerifyConfidentialGke_FullMethodName   = "/google.cloud.confidentialcomputing.v1.ConfidentialComputing/VerifyConfidentialGke"
)

// ConfidentialComputingClient is the client API for ConfidentialComputing 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 ConfidentialComputingClient interface {
	// Creates a new Challenge in a given project and location.
	CreateChallenge(ctx context.Context, in *CreateChallengeRequest, opts ...grpc.CallOption) (*Challenge, error)
	// Verifies the provided attestation info, returning a signed attestation
	// token.
	VerifyAttestation(ctx context.Context, in *VerifyAttestationRequest, opts ...grpc.CallOption) (*VerifyAttestationResponse, error)
	// Verifies whether the provided attestation info is valid, returning a signed
	// attestation token if so.
	VerifyConfidentialSpace(ctx context.Context, in *VerifyConfidentialSpaceRequest, opts ...grpc.CallOption) (*VerifyConfidentialSpaceResponse, error)
	// Verifies the provided Confidential GKE attestation info, returning a signed
	// OIDC token.
	VerifyConfidentialGke(ctx context.Context, in *VerifyConfidentialGkeRequest, opts ...grpc.CallOption) (*VerifyConfidentialGkeResponse, error)
}

type confidentialComputingClient struct {
	cc grpc.ClientConnInterface
}

func NewConfidentialComputingClient(cc grpc.ClientConnInterface) ConfidentialComputingClient {
	return &confidentialComputingClient{cc}
}

func (c *confidentialComputingClient) CreateChallenge(ctx context.Context, in *CreateChallengeRequest, opts ...grpc.CallOption) (*Challenge, error) {
	out := new(Challenge)
	err := c.cc.Invoke(ctx, ConfidentialComputing_CreateChallenge_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *confidentialComputingClient) VerifyAttestation(ctx context.Context, in *VerifyAttestationRequest, opts ...grpc.CallOption) (*VerifyAttestationResponse, error) {
	out := new(VerifyAttestationResponse)
	err := c.cc.Invoke(ctx, ConfidentialComputing_VerifyAttestation_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *confidentialComputingClient) VerifyConfidentialSpace(ctx context.Context, in *VerifyConfidentialSpaceRequest, opts ...grpc.CallOption) (*VerifyConfidentialSpaceResponse, error) {
	out := new(VerifyConfidentialSpaceResponse)
	err := c.cc.Invoke(ctx, ConfidentialComputing_VerifyConfidentialSpace_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *confidentialComputingClient) VerifyConfidentialGke(ctx context.Context, in *VerifyConfidentialGkeRequest, opts ...grpc.CallOption) (*VerifyConfidentialGkeResponse, error) {
	out := new(VerifyConfidentialGkeResponse)
	err := c.cc.Invoke(ctx, ConfidentialComputing_VerifyConfidentialGke_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ConfidentialComputingServer is the server API for ConfidentialComputing service.
// All implementations should embed UnimplementedConfidentialComputingServer
// for forward compatibility
type ConfidentialComputingServer interface {
	// Creates a new Challenge in a given project and location.
	CreateChallenge(context.Context, *CreateChallengeRequest) (*Challenge, error)
	// Verifies the provided attestation info, returning a signed attestation
	// token.
	VerifyAttestation(context.Context, *VerifyAttestationRequest) (*VerifyAttestationResponse, error)
	// Verifies whether the provided attestation info is valid, returning a signed
	// attestation token if so.
	VerifyConfidentialSpace(context.Context, *VerifyConfidentialSpaceRequest) (*VerifyConfidentialSpaceResponse, error)
	// Verifies the provided Confidential GKE attestation info, returning a signed
	// OIDC token.
	VerifyConfidentialGke(context.Context, *VerifyConfidentialGkeRequest) (*VerifyConfidentialGkeResponse, error)
}

// UnimplementedConfidentialComputingServer should be embedded to have forward compatible implementations.
type UnimplementedConfidentialComputingServer struct {
}

func (UnimplementedConfidentialComputingServer) CreateChallenge(context.Context, *CreateChallengeRequest) (*Challenge, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateChallenge not implemented")
}
func (UnimplementedConfidentialComputingServer) VerifyAttestation(context.Context, *VerifyAttestationRequest) (*VerifyAttestationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VerifyAttestation not implemented")
}
func (UnimplementedConfidentialComputingServer) VerifyConfidentialSpace(context.Context, *VerifyConfidentialSpaceRequest) (*VerifyConfidentialSpaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VerifyConfidentialSpace not implemented")
}
func (UnimplementedConfidentialComputingServer) VerifyConfidentialGke(context.Context, *VerifyConfidentialGkeRequest) (*VerifyConfidentialGkeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VerifyConfidentialGke not implemented")
}

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

func RegisterConfidentialComputingServer(s grpc.ServiceRegistrar, srv ConfidentialComputingServer) {
	s.RegisterService(&ConfidentialComputing_ServiceDesc, srv)
}

func _ConfidentialComputing_CreateChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateChallengeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfidentialComputingServer).CreateChallenge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfidentialComputing_CreateChallenge_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfidentialComputingServer).CreateChallenge(ctx, req.(*CreateChallengeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfidentialComputing_VerifyAttestation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyAttestationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfidentialComputingServer).VerifyAttestation(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfidentialComputing_VerifyAttestation_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfidentialComputingServer).VerifyAttestation(ctx, req.(*VerifyAttestationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfidentialComputing_VerifyConfidentialSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyConfidentialSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfidentialComputingServer).VerifyConfidentialSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfidentialComputing_VerifyConfidentialSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfidentialComputingServer).VerifyConfidentialSpace(ctx, req.(*VerifyConfidentialSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfidentialComputing_VerifyConfidentialGke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyConfidentialGkeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfidentialComputingServer).VerifyConfidentialGke(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfidentialComputing_VerifyConfidentialGke_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfidentialComputingServer).VerifyConfidentialGke(ctx, req.(*VerifyConfidentialGkeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ConfidentialComputing_ServiceDesc is the grpc.ServiceDesc for ConfidentialComputing service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConfidentialComputing_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.cloud.confidentialcomputing.v1.ConfidentialComputing",
	HandlerType: (*ConfidentialComputingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateChallenge",
			Handler:    _ConfidentialComputing_CreateChallenge_Handler,
		},
		{
			MethodName: "VerifyAttestation",
			Handler:    _ConfidentialComputing_VerifyAttestation_Handler,
		},
		{
			MethodName: "VerifyConfidentialSpace",
			Handler:    _ConfidentialComputing_VerifyConfidentialSpace_Handler,
		},
		{
			MethodName: "VerifyConfidentialGke",
			Handler:    _ConfidentialComputing_VerifyConfidentialGke_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/cloud/confidentialcomputing/v1/service.proto",
}
