// Code generated by protoc-gen-go-flipt-sdk. DO NOT EDIT.

package sdk

import (
	context "context"
	evaluation "go.flipt.io/flipt/rpc/flipt/evaluation"
)

type Evaluation struct {
	transport              evaluation.EvaluationServiceClient
	authenticationProvider ClientAuthenticationProvider
}

func (x *Evaluation) Boolean(ctx context.Context, v *evaluation.EvaluationRequest) (*evaluation.BooleanEvaluationResponse, error) {
	ctx, err := authenticate(ctx, x.authenticationProvider)
	if err != nil {
		return nil, err
	}
	return x.transport.Boolean(ctx, v)
}

func (x *Evaluation) Variant(ctx context.Context, v *evaluation.EvaluationRequest) (*evaluation.VariantEvaluationResponse, error) {
	ctx, err := authenticate(ctx, x.authenticationProvider)
	if err != nil {
		return nil, err
	}
	return x.transport.Variant(ctx, v)
}

func (x *Evaluation) Batch(ctx context.Context, v *evaluation.BatchEvaluationRequest) (*evaluation.BatchEvaluationResponse, error) {
	ctx, err := authenticate(ctx, x.authenticationProvider)
	if err != nil {
		return nil, err
	}
	return x.transport.Batch(ctx, v)
}
