// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT.
// source: api/cirrus_ci_service.proto

package api

import context "context"
import fmt "fmt"
import http "net/http"
import io "io"
import json "encoding/json"
import strconv "strconv"
import strings "strings"

import protojson "google.golang.org/protobuf/encoding/protojson"
import proto "google.golang.org/protobuf/proto"
import twirp "github.com/twitchtv/twirp"
import ctxsetters "github.com/twitchtv/twirp/ctxsetters"

import google_protobuf1 "google.golang.org/protobuf/types/known/emptypb"

import bytes "bytes"
import errors "errors"
import path "path"
import url "net/url"

// Version compatibility assertion.
// If the constant is not defined in the package, that likely means
// the package needs to be updated to work with this generated code.
// See https://twitchtv.github.io/twirp/docs/version_matrix.html
const _ = twirp.TwirpPackageMinVersion_8_1_0

// =============================================
// CirrusConfigurationEvaluatorService Interface
// =============================================

type CirrusConfigurationEvaluatorService interface {
	// Parser
	EvaluateConfig(context.Context, *EvaluateConfigRequest) (*EvaluateConfigResponse, error)

	JSONSchema(context.Context, *JSONSchemaRequest) (*JSONSchemaResponse, error)

	// Hooks
	EvaluateFunction(context.Context, *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error)
}

// ===================================================
// CirrusConfigurationEvaluatorService Protobuf Client
// ===================================================

type cirrusConfigurationEvaluatorServiceProtobufClient struct {
	client      HTTPClient
	urls        [3]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusConfigurationEvaluatorServiceProtobufClient creates a Protobuf client that implements the CirrusConfigurationEvaluatorService interface.
// It communicates using Protobuf and can be configured with a custom HTTPClient.
func NewCirrusConfigurationEvaluatorServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusConfigurationEvaluatorService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusConfigurationEvaluatorService")
	urls := [3]string{
		serviceURL + "EvaluateConfig",
		serviceURL + "JSONSchema",
		serviceURL + "EvaluateFunction",
	}

	return &cirrusConfigurationEvaluatorServiceProtobufClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) EvaluateConfig(ctx context.Context, in *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateConfig")
	caller := c.callEvaluateConfig
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateConfigRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateConfigRequest) when calling interceptor")
					}
					return c.callEvaluateConfig(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateConfigResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateConfigResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) callEvaluateConfig(ctx context.Context, in *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
	out := new(EvaluateConfigResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) JSONSchema(ctx context.Context, in *JSONSchemaRequest) (*JSONSchemaResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "JSONSchema")
	caller := c.callJSONSchema
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *JSONSchemaRequest) (*JSONSchemaResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*JSONSchemaRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*JSONSchemaRequest) when calling interceptor")
					}
					return c.callJSONSchema(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*JSONSchemaResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*JSONSchemaResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) callJSONSchema(ctx context.Context, in *JSONSchemaRequest) (*JSONSchemaResponse, error) {
	out := new(JSONSchemaResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) EvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateFunction")
	caller := c.callEvaluateFunction
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateFunctionRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateFunctionRequest) when calling interceptor")
					}
					return c.callEvaluateFunction(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateFunctionResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateFunctionResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceProtobufClient) callEvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
	out := new(EvaluateFunctionResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ===============================================
// CirrusConfigurationEvaluatorService JSON Client
// ===============================================

type cirrusConfigurationEvaluatorServiceJSONClient struct {
	client      HTTPClient
	urls        [3]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusConfigurationEvaluatorServiceJSONClient creates a JSON client that implements the CirrusConfigurationEvaluatorService interface.
// It communicates using JSON and can be configured with a custom HTTPClient.
func NewCirrusConfigurationEvaluatorServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusConfigurationEvaluatorService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusConfigurationEvaluatorService")
	urls := [3]string{
		serviceURL + "EvaluateConfig",
		serviceURL + "JSONSchema",
		serviceURL + "EvaluateFunction",
	}

	return &cirrusConfigurationEvaluatorServiceJSONClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) EvaluateConfig(ctx context.Context, in *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateConfig")
	caller := c.callEvaluateConfig
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateConfigRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateConfigRequest) when calling interceptor")
					}
					return c.callEvaluateConfig(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateConfigResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateConfigResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) callEvaluateConfig(ctx context.Context, in *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
	out := new(EvaluateConfigResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) JSONSchema(ctx context.Context, in *JSONSchemaRequest) (*JSONSchemaResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "JSONSchema")
	caller := c.callJSONSchema
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *JSONSchemaRequest) (*JSONSchemaResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*JSONSchemaRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*JSONSchemaRequest) when calling interceptor")
					}
					return c.callJSONSchema(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*JSONSchemaResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*JSONSchemaResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) callJSONSchema(ctx context.Context, in *JSONSchemaRequest) (*JSONSchemaResponse, error) {
	out := new(JSONSchemaResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) EvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateFunction")
	caller := c.callEvaluateFunction
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateFunctionRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateFunctionRequest) when calling interceptor")
					}
					return c.callEvaluateFunction(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateFunctionResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateFunctionResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusConfigurationEvaluatorServiceJSONClient) callEvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
	out := new(EvaluateFunctionResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ==================================================
// CirrusConfigurationEvaluatorService Server Handler
// ==================================================

type cirrusConfigurationEvaluatorServiceServer struct {
	CirrusConfigurationEvaluatorService
	interceptor      twirp.Interceptor
	hooks            *twirp.ServerHooks
	pathPrefix       string // prefix for routing
	jsonSkipDefaults bool   // do not include unpopulated fields (default values) in the response
	jsonCamelCase    bool   // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names
}

// NewCirrusConfigurationEvaluatorServiceServer builds a TwirpServer that can be used as an http.Handler to handle
// HTTP requests that are routed to the right method in the provided svc implementation.
// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewCirrusConfigurationEvaluatorServiceServer(svc CirrusConfigurationEvaluatorService, opts ...interface{}) TwirpServer {
	serverOpts := newServerOpts(opts)

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	jsonSkipDefaults := false
	_ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults)
	jsonCamelCase := false
	_ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase)
	var pathPrefix string
	if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	return &cirrusConfigurationEvaluatorServiceServer{
		CirrusConfigurationEvaluatorService: svc,
		hooks:                               serverOpts.Hooks,
		interceptor:                         twirp.ChainInterceptors(serverOpts.Interceptors...),
		pathPrefix:                          pathPrefix,
		jsonSkipDefaults:                    jsonSkipDefaults,
		jsonCamelCase:                       jsonCamelCase,
	}
}

// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks.
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
func (s *cirrusConfigurationEvaluatorServiceServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) {
	writeError(ctx, resp, err, s.hooks)
}

// handleRequestBodyError is used to handle error when the twirp server cannot read request
func (s *cirrusConfigurationEvaluatorServiceServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) {
	if context.Canceled == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled"))
		return
	}
	if context.DeadlineExceeded == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded"))
		return
	}
	s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err))
}

// CirrusConfigurationEvaluatorServicePathPrefix is a convenience constant that may identify URL paths.
// Should be used with caution, it only matches routes generated by Twirp Go clients,
// with the default "/twirp" prefix and default CamelCase service and method names.
// More info: https://twitchtv.github.io/twirp/docs/routing.html
const CirrusConfigurationEvaluatorServicePathPrefix = "/twirp/org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService/"

func (s *cirrusConfigurationEvaluatorServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
	ctx := req.Context()
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusConfigurationEvaluatorService")
	ctx = ctxsetters.WithResponseWriter(ctx, resp)

	var err error
	ctx, err = callRequestReceived(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	if req.Method != "POST" {
		msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	// Verify path format: [<prefix>]/<package>.<Service>/<Method>
	prefix, pkgService, method := parseTwirpPath(req.URL.Path)
	if pkgService != "org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService" {
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
	if prefix != s.pathPrefix {
		msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	switch method {
	case "EvaluateConfig":
		s.serveEvaluateConfig(ctx, resp, req)
		return
	case "JSONSchema":
		s.serveJSONSchema(ctx, resp, req)
		return
	case "EvaluateFunction":
		s.serveEvaluateFunction(ctx, resp, req)
		return
	default:
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateConfig(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveEvaluateConfigJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveEvaluateConfigProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateConfigJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateConfig")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(EvaluateConfigRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.EvaluateConfig
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateConfigRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateConfigRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.EvaluateConfig(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateConfigResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateConfigResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *EvaluateConfigResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *EvaluateConfigResponse and nil error while calling EvaluateConfig. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateConfigProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateConfig")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(EvaluateConfigRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.EvaluateConfig
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateConfigRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateConfigRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.EvaluateConfig(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateConfigResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateConfigResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *EvaluateConfigResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *EvaluateConfigResponse and nil error while calling EvaluateConfig. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveJSONSchema(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveJSONSchemaJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveJSONSchemaProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveJSONSchemaJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "JSONSchema")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(JSONSchemaRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.JSONSchema
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *JSONSchemaRequest) (*JSONSchemaResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*JSONSchemaRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*JSONSchemaRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.JSONSchema(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*JSONSchemaResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*JSONSchemaResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *JSONSchemaResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *JSONSchemaResponse and nil error while calling JSONSchema. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveJSONSchemaProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "JSONSchema")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(JSONSchemaRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.JSONSchema
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *JSONSchemaRequest) (*JSONSchemaResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*JSONSchemaRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*JSONSchemaRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.JSONSchema(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*JSONSchemaResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*JSONSchemaResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *JSONSchemaResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *JSONSchemaResponse and nil error while calling JSONSchema. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateFunction(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveEvaluateFunctionJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveEvaluateFunctionProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateFunctionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateFunction")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(EvaluateFunctionRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.EvaluateFunction
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateFunctionRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateFunctionRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.EvaluateFunction(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateFunctionResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateFunctionResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *EvaluateFunctionResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *EvaluateFunctionResponse and nil error while calling EvaluateFunction. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) serveEvaluateFunctionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "EvaluateFunction")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(EvaluateFunctionRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusConfigurationEvaluatorService.EvaluateFunction
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*EvaluateFunctionRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*EvaluateFunctionRequest) when calling interceptor")
					}
					return s.CirrusConfigurationEvaluatorService.EvaluateFunction(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*EvaluateFunctionResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*EvaluateFunctionResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *EvaluateFunctionResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *EvaluateFunctionResponse and nil error while calling EvaluateFunction. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusConfigurationEvaluatorServiceServer) ServiceDescriptor() ([]byte, int) {
	return twirpFileDescriptor0, 0
}

func (s *cirrusConfigurationEvaluatorServiceServer) ProtocGenTwirpVersion() string {
	return "v8.1.3"
}

// PathPrefix returns the base service path, in the form: "/<prefix>/<package>.<Service>/"
// that is everything in a Twirp route except for the <Method>. This can be used for routing,
// for example to identify the requests that are targeted to this service in a mux.
func (s *cirrusConfigurationEvaluatorServiceServer) PathPrefix() string {
	return baseServicePath(s.pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusConfigurationEvaluatorService")
}

// =====================================
// CirrusRemoteExecutorService Interface
// =====================================

type CirrusRemoteExecutorService interface {
	Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error)
}

// ===========================================
// CirrusRemoteExecutorService Protobuf Client
// ===========================================

type cirrusRemoteExecutorServiceProtobufClient struct {
	client      HTTPClient
	urls        [1]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusRemoteExecutorServiceProtobufClient creates a Protobuf client that implements the CirrusRemoteExecutorService interface.
// It communicates using Protobuf and can be configured with a custom HTTPClient.
func NewCirrusRemoteExecutorServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusRemoteExecutorService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusRemoteExecutorService")
	urls := [1]string{
		serviceURL + "Capabilities",
	}

	return &cirrusRemoteExecutorServiceProtobufClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusRemoteExecutorServiceProtobufClient) Capabilities(ctx context.Context, in *CapabilitiesRequest) (*CapabilitiesResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusRemoteExecutorService")
	ctx = ctxsetters.WithMethodName(ctx, "Capabilities")
	caller := c.callCapabilities
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CapabilitiesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CapabilitiesRequest) when calling interceptor")
					}
					return c.callCapabilities(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CapabilitiesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CapabilitiesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusRemoteExecutorServiceProtobufClient) callCapabilities(ctx context.Context, in *CapabilitiesRequest) (*CapabilitiesResponse, error) {
	out := new(CapabilitiesResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// =======================================
// CirrusRemoteExecutorService JSON Client
// =======================================

type cirrusRemoteExecutorServiceJSONClient struct {
	client      HTTPClient
	urls        [1]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusRemoteExecutorServiceJSONClient creates a JSON client that implements the CirrusRemoteExecutorService interface.
// It communicates using JSON and can be configured with a custom HTTPClient.
func NewCirrusRemoteExecutorServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusRemoteExecutorService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusRemoteExecutorService")
	urls := [1]string{
		serviceURL + "Capabilities",
	}

	return &cirrusRemoteExecutorServiceJSONClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusRemoteExecutorServiceJSONClient) Capabilities(ctx context.Context, in *CapabilitiesRequest) (*CapabilitiesResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusRemoteExecutorService")
	ctx = ctxsetters.WithMethodName(ctx, "Capabilities")
	caller := c.callCapabilities
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CapabilitiesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CapabilitiesRequest) when calling interceptor")
					}
					return c.callCapabilities(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CapabilitiesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CapabilitiesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusRemoteExecutorServiceJSONClient) callCapabilities(ctx context.Context, in *CapabilitiesRequest) (*CapabilitiesResponse, error) {
	out := new(CapabilitiesResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ==========================================
// CirrusRemoteExecutorService Server Handler
// ==========================================

type cirrusRemoteExecutorServiceServer struct {
	CirrusRemoteExecutorService
	interceptor      twirp.Interceptor
	hooks            *twirp.ServerHooks
	pathPrefix       string // prefix for routing
	jsonSkipDefaults bool   // do not include unpopulated fields (default values) in the response
	jsonCamelCase    bool   // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names
}

// NewCirrusRemoteExecutorServiceServer builds a TwirpServer that can be used as an http.Handler to handle
// HTTP requests that are routed to the right method in the provided svc implementation.
// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewCirrusRemoteExecutorServiceServer(svc CirrusRemoteExecutorService, opts ...interface{}) TwirpServer {
	serverOpts := newServerOpts(opts)

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	jsonSkipDefaults := false
	_ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults)
	jsonCamelCase := false
	_ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase)
	var pathPrefix string
	if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	return &cirrusRemoteExecutorServiceServer{
		CirrusRemoteExecutorService: svc,
		hooks:                       serverOpts.Hooks,
		interceptor:                 twirp.ChainInterceptors(serverOpts.Interceptors...),
		pathPrefix:                  pathPrefix,
		jsonSkipDefaults:            jsonSkipDefaults,
		jsonCamelCase:               jsonCamelCase,
	}
}

// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks.
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
func (s *cirrusRemoteExecutorServiceServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) {
	writeError(ctx, resp, err, s.hooks)
}

// handleRequestBodyError is used to handle error when the twirp server cannot read request
func (s *cirrusRemoteExecutorServiceServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) {
	if context.Canceled == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled"))
		return
	}
	if context.DeadlineExceeded == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded"))
		return
	}
	s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err))
}

// CirrusRemoteExecutorServicePathPrefix is a convenience constant that may identify URL paths.
// Should be used with caution, it only matches routes generated by Twirp Go clients,
// with the default "/twirp" prefix and default CamelCase service and method names.
// More info: https://twitchtv.github.io/twirp/docs/routing.html
const CirrusRemoteExecutorServicePathPrefix = "/twirp/org.cirruslabs.ci.services.cirruscigrpc.CirrusRemoteExecutorService/"

func (s *cirrusRemoteExecutorServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
	ctx := req.Context()
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusRemoteExecutorService")
	ctx = ctxsetters.WithResponseWriter(ctx, resp)

	var err error
	ctx, err = callRequestReceived(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	if req.Method != "POST" {
		msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	// Verify path format: [<prefix>]/<package>.<Service>/<Method>
	prefix, pkgService, method := parseTwirpPath(req.URL.Path)
	if pkgService != "org.cirruslabs.ci.services.cirruscigrpc.CirrusRemoteExecutorService" {
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
	if prefix != s.pathPrefix {
		msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	switch method {
	case "Capabilities":
		s.serveCapabilities(ctx, resp, req)
		return
	default:
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
}

func (s *cirrusRemoteExecutorServiceServer) serveCapabilities(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveCapabilitiesJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveCapabilitiesProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusRemoteExecutorServiceServer) serveCapabilitiesJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Capabilities")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CapabilitiesRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusRemoteExecutorService.Capabilities
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CapabilitiesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CapabilitiesRequest) when calling interceptor")
					}
					return s.CirrusRemoteExecutorService.Capabilities(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CapabilitiesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CapabilitiesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CapabilitiesResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CapabilitiesResponse and nil error while calling Capabilities. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusRemoteExecutorServiceServer) serveCapabilitiesProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Capabilities")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CapabilitiesRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusRemoteExecutorService.Capabilities
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CapabilitiesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CapabilitiesRequest) when calling interceptor")
					}
					return s.CirrusRemoteExecutorService.Capabilities(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CapabilitiesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CapabilitiesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CapabilitiesResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CapabilitiesResponse and nil error while calling Capabilities. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusRemoteExecutorServiceServer) ServiceDescriptor() ([]byte, int) {
	return twirpFileDescriptor0, 1
}

func (s *cirrusRemoteExecutorServiceServer) ProtocGenTwirpVersion() string {
	return "v8.1.3"
}

// PathPrefix returns the base service path, in the form: "/<prefix>/<package>.<Service>/"
// that is everything in a Twirp route except for the <Method>. This can be used for routing,
// for example to identify the requests that are targeted to this service in a mux.
func (s *cirrusRemoteExecutorServiceServer) PathPrefix() string {
	return baseServicePath(s.pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusRemoteExecutorService")
}

// ==============================
// CirrusWorkersService Interface
// ==============================

type CirrusWorkersService interface {
	// Issued by the persistent worker after it starts
	//
	// Can be called without a session token.
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)

	// Periodically issued by the registered persistent worker to get new jobs and indicate that it's alive
	Poll(context.Context, *PollRequest) (*PollResponse, error)

	// Issued by the registered persistent worker to indicate task status
	TaskStarted(context.Context, *TaskIdentification) (*google_protobuf1.Empty, error)

	TaskFailed(context.Context, *TaskFailedRequest) (*google_protobuf1.Empty, error)

	TaskStopped(context.Context, *TaskIdentification) (*google_protobuf1.Empty, error)

	UpdateStatus(context.Context, *UpdateStatusRequest) (*WorkerStatus, error)

	QueryRunningTasks(context.Context, *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error)
}

// ====================================
// CirrusWorkersService Protobuf Client
// ====================================

type cirrusWorkersServiceProtobufClient struct {
	client      HTTPClient
	urls        [7]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusWorkersServiceProtobufClient creates a Protobuf client that implements the CirrusWorkersService interface.
// It communicates using Protobuf and can be configured with a custom HTTPClient.
func NewCirrusWorkersServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusWorkersService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusWorkersService")
	urls := [7]string{
		serviceURL + "Register",
		serviceURL + "Poll",
		serviceURL + "TaskStarted",
		serviceURL + "TaskFailed",
		serviceURL + "TaskStopped",
		serviceURL + "UpdateStatus",
		serviceURL + "QueryRunningTasks",
	}

	return &cirrusWorkersServiceProtobufClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusWorkersServiceProtobufClient) Register(ctx context.Context, in *RegisterRequest) (*RegisterResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "Register")
	caller := c.callRegister
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*RegisterRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*RegisterRequest) when calling interceptor")
					}
					return c.callRegister(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*RegisterResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*RegisterResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callRegister(ctx context.Context, in *RegisterRequest) (*RegisterResponse, error) {
	out := new(RegisterResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) Poll(ctx context.Context, in *PollRequest) (*PollResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "Poll")
	caller := c.callPoll
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *PollRequest) (*PollResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*PollRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*PollRequest) when calling interceptor")
					}
					return c.callPoll(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*PollResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*PollResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callPoll(ctx context.Context, in *PollRequest) (*PollResponse, error) {
	out := new(PollResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) TaskStarted(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskStarted")
	caller := c.callTaskStarted
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return c.callTaskStarted(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callTaskStarted(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) TaskFailed(ctx context.Context, in *TaskFailedRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskFailed")
	caller := c.callTaskFailed
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskFailedRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskFailedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskFailedRequest) when calling interceptor")
					}
					return c.callTaskFailed(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callTaskFailed(ctx context.Context, in *TaskFailedRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) TaskStopped(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskStopped")
	caller := c.callTaskStopped
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return c.callTaskStopped(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callTaskStopped(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) UpdateStatus(ctx context.Context, in *UpdateStatusRequest) (*WorkerStatus, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "UpdateStatus")
	caller := c.callUpdateStatus
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *UpdateStatusRequest) (*WorkerStatus, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*UpdateStatusRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*UpdateStatusRequest) when calling interceptor")
					}
					return c.callUpdateStatus(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*WorkerStatus)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*WorkerStatus) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callUpdateStatus(ctx context.Context, in *UpdateStatusRequest) (*WorkerStatus, error) {
	out := new(WorkerStatus)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceProtobufClient) QueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "QueryRunningTasks")
	caller := c.callQueryRunningTasks
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*QueryRunningTasksRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*QueryRunningTasksRequest) when calling interceptor")
					}
					return c.callQueryRunningTasks(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*QueryRunningTasksResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*QueryRunningTasksResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceProtobufClient) callQueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
	out := new(QueryRunningTasksResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[6], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ================================
// CirrusWorkersService JSON Client
// ================================

type cirrusWorkersServiceJSONClient struct {
	client      HTTPClient
	urls        [7]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusWorkersServiceJSONClient creates a JSON client that implements the CirrusWorkersService interface.
// It communicates using JSON and can be configured with a custom HTTPClient.
func NewCirrusWorkersServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusWorkersService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusWorkersService")
	urls := [7]string{
		serviceURL + "Register",
		serviceURL + "Poll",
		serviceURL + "TaskStarted",
		serviceURL + "TaskFailed",
		serviceURL + "TaskStopped",
		serviceURL + "UpdateStatus",
		serviceURL + "QueryRunningTasks",
	}

	return &cirrusWorkersServiceJSONClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusWorkersServiceJSONClient) Register(ctx context.Context, in *RegisterRequest) (*RegisterResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "Register")
	caller := c.callRegister
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*RegisterRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*RegisterRequest) when calling interceptor")
					}
					return c.callRegister(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*RegisterResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*RegisterResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callRegister(ctx context.Context, in *RegisterRequest) (*RegisterResponse, error) {
	out := new(RegisterResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) Poll(ctx context.Context, in *PollRequest) (*PollResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "Poll")
	caller := c.callPoll
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *PollRequest) (*PollResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*PollRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*PollRequest) when calling interceptor")
					}
					return c.callPoll(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*PollResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*PollResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callPoll(ctx context.Context, in *PollRequest) (*PollResponse, error) {
	out := new(PollResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) TaskStarted(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskStarted")
	caller := c.callTaskStarted
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return c.callTaskStarted(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callTaskStarted(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) TaskFailed(ctx context.Context, in *TaskFailedRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskFailed")
	caller := c.callTaskFailed
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskFailedRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskFailedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskFailedRequest) when calling interceptor")
					}
					return c.callTaskFailed(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callTaskFailed(ctx context.Context, in *TaskFailedRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) TaskStopped(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "TaskStopped")
	caller := c.callTaskStopped
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return c.callTaskStopped(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callTaskStopped(ctx context.Context, in *TaskIdentification) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) UpdateStatus(ctx context.Context, in *UpdateStatusRequest) (*WorkerStatus, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "UpdateStatus")
	caller := c.callUpdateStatus
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *UpdateStatusRequest) (*WorkerStatus, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*UpdateStatusRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*UpdateStatusRequest) when calling interceptor")
					}
					return c.callUpdateStatus(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*WorkerStatus)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*WorkerStatus) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callUpdateStatus(ctx context.Context, in *UpdateStatusRequest) (*WorkerStatus, error) {
	out := new(WorkerStatus)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusWorkersServiceJSONClient) QueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithMethodName(ctx, "QueryRunningTasks")
	caller := c.callQueryRunningTasks
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*QueryRunningTasksRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*QueryRunningTasksRequest) when calling interceptor")
					}
					return c.callQueryRunningTasks(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*QueryRunningTasksResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*QueryRunningTasksResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusWorkersServiceJSONClient) callQueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
	out := new(QueryRunningTasksResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[6], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ===================================
// CirrusWorkersService Server Handler
// ===================================

type cirrusWorkersServiceServer struct {
	CirrusWorkersService
	interceptor      twirp.Interceptor
	hooks            *twirp.ServerHooks
	pathPrefix       string // prefix for routing
	jsonSkipDefaults bool   // do not include unpopulated fields (default values) in the response
	jsonCamelCase    bool   // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names
}

// NewCirrusWorkersServiceServer builds a TwirpServer that can be used as an http.Handler to handle
// HTTP requests that are routed to the right method in the provided svc implementation.
// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewCirrusWorkersServiceServer(svc CirrusWorkersService, opts ...interface{}) TwirpServer {
	serverOpts := newServerOpts(opts)

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	jsonSkipDefaults := false
	_ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults)
	jsonCamelCase := false
	_ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase)
	var pathPrefix string
	if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	return &cirrusWorkersServiceServer{
		CirrusWorkersService: svc,
		hooks:                serverOpts.Hooks,
		interceptor:          twirp.ChainInterceptors(serverOpts.Interceptors...),
		pathPrefix:           pathPrefix,
		jsonSkipDefaults:     jsonSkipDefaults,
		jsonCamelCase:        jsonCamelCase,
	}
}

// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks.
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
func (s *cirrusWorkersServiceServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) {
	writeError(ctx, resp, err, s.hooks)
}

// handleRequestBodyError is used to handle error when the twirp server cannot read request
func (s *cirrusWorkersServiceServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) {
	if context.Canceled == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled"))
		return
	}
	if context.DeadlineExceeded == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded"))
		return
	}
	s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err))
}

// CirrusWorkersServicePathPrefix is a convenience constant that may identify URL paths.
// Should be used with caution, it only matches routes generated by Twirp Go clients,
// with the default "/twirp" prefix and default CamelCase service and method names.
// More info: https://twitchtv.github.io/twirp/docs/routing.html
const CirrusWorkersServicePathPrefix = "/twirp/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/"

func (s *cirrusWorkersServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
	ctx := req.Context()
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusWorkersService")
	ctx = ctxsetters.WithResponseWriter(ctx, resp)

	var err error
	ctx, err = callRequestReceived(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	if req.Method != "POST" {
		msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	// Verify path format: [<prefix>]/<package>.<Service>/<Method>
	prefix, pkgService, method := parseTwirpPath(req.URL.Path)
	if pkgService != "org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService" {
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
	if prefix != s.pathPrefix {
		msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	switch method {
	case "Register":
		s.serveRegister(ctx, resp, req)
		return
	case "Poll":
		s.servePoll(ctx, resp, req)
		return
	case "TaskStarted":
		s.serveTaskStarted(ctx, resp, req)
		return
	case "TaskFailed":
		s.serveTaskFailed(ctx, resp, req)
		return
	case "TaskStopped":
		s.serveTaskStopped(ctx, resp, req)
		return
	case "UpdateStatus":
		s.serveUpdateStatus(ctx, resp, req)
		return
	case "QueryRunningTasks":
		s.serveQueryRunningTasks(ctx, resp, req)
		return
	default:
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
}

func (s *cirrusWorkersServiceServer) serveRegister(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveRegisterJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveRegisterProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveRegisterJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Register")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(RegisterRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.Register
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*RegisterRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*RegisterRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.Register(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*RegisterResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*RegisterResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *RegisterResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *RegisterResponse and nil error while calling Register. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveRegisterProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Register")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(RegisterRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.Register
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*RegisterRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*RegisterRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.Register(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*RegisterResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*RegisterResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *RegisterResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *RegisterResponse and nil error while calling Register. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) servePoll(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.servePollJSON(ctx, resp, req)
	case "application/protobuf":
		s.servePollProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) servePollJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Poll")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(PollRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.Poll
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *PollRequest) (*PollResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*PollRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*PollRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.Poll(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*PollResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*PollResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *PollResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *PollResponse and nil error while calling Poll. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) servePollProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Poll")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(PollRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.Poll
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *PollRequest) (*PollResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*PollRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*PollRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.Poll(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*PollResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*PollResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *PollResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *PollResponse and nil error while calling Poll. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskStarted(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveTaskStartedJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveTaskStartedProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveTaskStartedJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskStarted")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(TaskIdentification)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.TaskStarted
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskStarted(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskStarted. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskStartedProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskStarted")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(TaskIdentification)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.TaskStarted
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskStarted(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskStarted. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskFailed(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveTaskFailedJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveTaskFailedProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveTaskFailedJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskFailed")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(TaskFailedRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.TaskFailed
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskFailedRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskFailedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskFailedRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskFailed(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskFailed. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskFailedProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskFailed")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(TaskFailedRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.TaskFailed
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskFailedRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskFailedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskFailedRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskFailed(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskFailed. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskStopped(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveTaskStoppedJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveTaskStoppedProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveTaskStoppedJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskStopped")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(TaskIdentification)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.TaskStopped
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskStopped(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskStopped. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveTaskStoppedProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "TaskStopped")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(TaskIdentification)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.TaskStopped
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *TaskIdentification) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*TaskIdentification)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*TaskIdentification) when calling interceptor")
					}
					return s.CirrusWorkersService.TaskStopped(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling TaskStopped. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveUpdateStatus(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveUpdateStatusJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveUpdateStatusProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveUpdateStatusJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UpdateStatus")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(UpdateStatusRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.UpdateStatus
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *UpdateStatusRequest) (*WorkerStatus, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*UpdateStatusRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*UpdateStatusRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.UpdateStatus(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*WorkerStatus)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*WorkerStatus) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *WorkerStatus
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *WorkerStatus and nil error while calling UpdateStatus. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveUpdateStatusProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UpdateStatus")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(UpdateStatusRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.UpdateStatus
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *UpdateStatusRequest) (*WorkerStatus, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*UpdateStatusRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*UpdateStatusRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.UpdateStatus(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*WorkerStatus)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*WorkerStatus) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *WorkerStatus
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *WorkerStatus and nil error while calling UpdateStatus. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveQueryRunningTasks(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveQueryRunningTasksJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveQueryRunningTasksProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusWorkersServiceServer) serveQueryRunningTasksJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "QueryRunningTasks")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(QueryRunningTasksRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusWorkersService.QueryRunningTasks
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*QueryRunningTasksRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*QueryRunningTasksRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.QueryRunningTasks(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*QueryRunningTasksResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*QueryRunningTasksResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *QueryRunningTasksResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *QueryRunningTasksResponse and nil error while calling QueryRunningTasks. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) serveQueryRunningTasksProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "QueryRunningTasks")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(QueryRunningTasksRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusWorkersService.QueryRunningTasks
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*QueryRunningTasksRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*QueryRunningTasksRequest) when calling interceptor")
					}
					return s.CirrusWorkersService.QueryRunningTasks(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*QueryRunningTasksResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*QueryRunningTasksResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *QueryRunningTasksResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *QueryRunningTasksResponse and nil error while calling QueryRunningTasks. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusWorkersServiceServer) ServiceDescriptor() ([]byte, int) {
	return twirpFileDescriptor0, 2
}

func (s *cirrusWorkersServiceServer) ProtocGenTwirpVersion() string {
	return "v8.1.3"
}

// PathPrefix returns the base service path, in the form: "/<prefix>/<package>.<Service>/"
// that is everything in a Twirp route except for the <Method>. This can be used for routing,
// for example to identify the requests that are targeted to this service in a mux.
func (s *cirrusWorkersServiceServer) PathPrefix() string {
	return baseServicePath(s.pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusWorkersService")
}

// =========================
// CirrusCIService Interface
// =========================

type CirrusCIService interface {
	InitialCommands(context.Context, *InitialCommandsRequest) (*CommandsResponse, error)

	ReportCommandUpdates(context.Context, *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error)

	ReportAnnotations(context.Context, *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error)

	StreamLogs(context.Context, *LogEntry) (*UploadLogsResponse, error)

	SaveLogs(context.Context, *LogEntry) (*UploadLogsResponse, error)

	UploadCache(context.Context, *CacheEntry) (*UploadCacheResponse, error)

	// Artifacts upload over gRPC
	UploadArtifacts(context.Context, *ArtifactEntry) (*UploadArtifactsResponse, error)

	// Artifacts upload over HTTPS
	GenerateArtifactUploadURLs(context.Context, *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error)

	CommitUploadedArtifacts(context.Context, *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error)

	DownloadCache(context.Context, *DownloadCacheRequest) (*DataChunk, error)

	CacheInfo(context.Context, *CacheInfoRequest) (*CacheInfoResponse, error)

	DeleteCache(context.Context, *DeleteCacheRequest) (*DeleteCacheResponse, error)

	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)

	ReportStopHook(context.Context, *ReportStopHookRequest) (*google_protobuf1.Empty, error)

	ReportAgentError(context.Context, *ReportAgentProblemRequest) (*google_protobuf1.Empty, error)

	ReportAgentWarning(context.Context, *ReportAgentProblemRequest) (*google_protobuf1.Empty, error)

	ReportAgentSignal(context.Context, *ReportAgentSignalRequest) (*google_protobuf1.Empty, error)

	ReportAgentLogs(context.Context, *ReportAgentLogsRequest) (*google_protobuf1.Empty, error)

	ReportAgentFinished(context.Context, *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error)

	ReportTerminalAttached(context.Context, *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error)

	ReportTerminalLifecycle(context.Context, *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error)

	GenerateCacheUploadURL(context.Context, *CacheKey) (*GenerateURLResponse, error)

	GenerateCacheDownloadURLs(context.Context, *CacheKey) (*GenerateURLsResponse, error)

	// Multipart cache upload
	MultipartCacheUploadCreate(context.Context, *CacheKey) (*MultipartCacheUploadCreateResponse, error)

	MultipartCacheUploadPart(context.Context, *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error)

	MultipartCacheUploadCommit(context.Context, *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error)
}

// ===============================
// CirrusCIService Protobuf Client
// ===============================

type cirrusCIServiceProtobufClient struct {
	client      HTTPClient
	urls        [26]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusCIServiceProtobufClient creates a Protobuf client that implements the CirrusCIService interface.
// It communicates using Protobuf and can be configured with a custom HTTPClient.
func NewCirrusCIServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusCIService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusCIService")
	urls := [26]string{
		serviceURL + "InitialCommands",
		serviceURL + "ReportCommandUpdates",
		serviceURL + "ReportAnnotations",
		serviceURL + "StreamLogs",
		serviceURL + "SaveLogs",
		serviceURL + "UploadCache",
		serviceURL + "UploadArtifacts",
		serviceURL + "GenerateArtifactUploadURLs",
		serviceURL + "CommitUploadedArtifacts",
		serviceURL + "DownloadCache",
		serviceURL + "CacheInfo",
		serviceURL + "DeleteCache",
		serviceURL + "Heartbeat",
		serviceURL + "ReportStopHook",
		serviceURL + "ReportAgentError",
		serviceURL + "ReportAgentWarning",
		serviceURL + "ReportAgentSignal",
		serviceURL + "ReportAgentLogs",
		serviceURL + "ReportAgentFinished",
		serviceURL + "ReportTerminalAttached",
		serviceURL + "ReportTerminalLifecycle",
		serviceURL + "GenerateCacheUploadURL",
		serviceURL + "GenerateCacheDownloadURLs",
		serviceURL + "MultipartCacheUploadCreate",
		serviceURL + "MultipartCacheUploadPart",
		serviceURL + "MultipartCacheUploadCommit",
	}

	return &cirrusCIServiceProtobufClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusCIServiceProtobufClient) InitialCommands(ctx context.Context, in *InitialCommandsRequest) (*CommandsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "InitialCommands")
	caller := c.callInitialCommands
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *InitialCommandsRequest) (*CommandsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*InitialCommandsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*InitialCommandsRequest) when calling interceptor")
					}
					return c.callInitialCommands(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommandsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommandsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callInitialCommands(ctx context.Context, in *InitialCommandsRequest) (*CommandsResponse, error) {
	out := new(CommandsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportCommandUpdates")
	caller := c.callReportCommandUpdates
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportCommandUpdatesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportCommandUpdatesRequest) when calling interceptor")
					}
					return c.callReportCommandUpdates(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportCommandUpdatesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportCommandUpdatesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
	out := new(ReportCommandUpdatesResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAnnotations")
	caller := c.callReportAnnotations
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAnnotationsCommandRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAnnotationsCommandRequest) when calling interceptor")
					}
					return c.callReportAnnotations(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) StreamLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "StreamLogs")
	caller := c.callStreamLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return c.callStreamLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callStreamLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	out := new(UploadLogsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) SaveLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "SaveLogs")
	caller := c.callSaveLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return c.callSaveLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callSaveLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	out := new(UploadLogsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) UploadCache(ctx context.Context, in *CacheEntry) (*UploadCacheResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "UploadCache")
	caller := c.callUploadCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheEntry) (*UploadCacheResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheEntry) when calling interceptor")
					}
					return c.callUploadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callUploadCache(ctx context.Context, in *CacheEntry) (*UploadCacheResponse, error) {
	out := new(UploadCacheResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) UploadArtifacts(ctx context.Context, in *ArtifactEntry) (*UploadArtifactsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "UploadArtifacts")
	caller := c.callUploadArtifacts
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ArtifactEntry) (*UploadArtifactsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ArtifactEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ArtifactEntry) when calling interceptor")
					}
					return c.callUploadArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callUploadArtifacts(ctx context.Context, in *ArtifactEntry) (*UploadArtifactsResponse, error) {
	out := new(UploadArtifactsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[6], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) GenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateArtifactUploadURLs")
	caller := c.callGenerateArtifactUploadURLs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*GenerateArtifactUploadURLsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*GenerateArtifactUploadURLsRequest) when calling interceptor")
					}
					return c.callGenerateArtifactUploadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateArtifactUploadURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateArtifactUploadURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callGenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
	out := new(GenerateArtifactUploadURLsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[7], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) CommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "CommitUploadedArtifacts")
	caller := c.callCommitUploadedArtifacts
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CommitUploadedArtifactsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CommitUploadedArtifactsRequest) when calling interceptor")
					}
					return c.callCommitUploadedArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommitUploadedArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommitUploadedArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callCommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
	out := new(CommitUploadedArtifactsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[8], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) DownloadCache(ctx context.Context, in *DownloadCacheRequest) (*DataChunk, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "DownloadCache")
	caller := c.callDownloadCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *DownloadCacheRequest) (*DataChunk, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DownloadCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DownloadCacheRequest) when calling interceptor")
					}
					return c.callDownloadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DataChunk)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DataChunk) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callDownloadCache(ctx context.Context, in *DownloadCacheRequest) (*DataChunk, error) {
	out := new(DataChunk)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[9], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) CacheInfo(ctx context.Context, in *CacheInfoRequest) (*CacheInfoResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "CacheInfo")
	caller := c.callCacheInfo
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheInfoRequest) (*CacheInfoResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheInfoRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheInfoRequest) when calling interceptor")
					}
					return c.callCacheInfo(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CacheInfoResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CacheInfoResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callCacheInfo(ctx context.Context, in *CacheInfoRequest) (*CacheInfoResponse, error) {
	out := new(CacheInfoResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[10], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) DeleteCache(ctx context.Context, in *DeleteCacheRequest) (*DeleteCacheResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "DeleteCache")
	caller := c.callDeleteCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *DeleteCacheRequest) (*DeleteCacheResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DeleteCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DeleteCacheRequest) when calling interceptor")
					}
					return c.callDeleteCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DeleteCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DeleteCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callDeleteCache(ctx context.Context, in *DeleteCacheRequest) (*DeleteCacheResponse, error) {
	out := new(DeleteCacheResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[11], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) Heartbeat(ctx context.Context, in *HeartbeatRequest) (*HeartbeatResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "Heartbeat")
	caller := c.callHeartbeat
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *HeartbeatRequest) (*HeartbeatResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*HeartbeatRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*HeartbeatRequest) when calling interceptor")
					}
					return c.callHeartbeat(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*HeartbeatResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*HeartbeatResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callHeartbeat(ctx context.Context, in *HeartbeatRequest) (*HeartbeatResponse, error) {
	out := new(HeartbeatResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[12], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportStopHook(ctx context.Context, in *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportStopHook")
	caller := c.callReportStopHook
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportStopHookRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportStopHookRequest) when calling interceptor")
					}
					return c.callReportStopHook(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportStopHook(ctx context.Context, in *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[13], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAgentError(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentError")
	caller := c.callReportAgentError
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return c.callReportAgentError(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAgentError(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[14], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentWarning")
	caller := c.callReportAgentWarning
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return c.callReportAgentWarning(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[15], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentSignal")
	caller := c.callReportAgentSignal
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentSignalRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentSignalRequest) when calling interceptor")
					}
					return c.callReportAgentSignal(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[16], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentLogs")
	caller := c.callReportAgentLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentLogsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentLogsRequest) when calling interceptor")
					}
					return c.callReportAgentLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[17], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentFinished")
	caller := c.callReportAgentFinished
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentFinishedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentFinishedRequest) when calling interceptor")
					}
					return c.callReportAgentFinished(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportAgentFinishedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportAgentFinishedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
	out := new(ReportAgentFinishedResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[18], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalAttached")
	caller := c.callReportTerminalAttached
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalAttachedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalAttachedRequest) when calling interceptor")
					}
					return c.callReportTerminalAttached(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalAttachedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalAttachedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
	out := new(ReportTerminalAttachedResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[19], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) ReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalLifecycle")
	caller := c.callReportTerminalLifecycle
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalLifecycleRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalLifecycleRequest) when calling interceptor")
					}
					return c.callReportTerminalLifecycle(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalLifecycleResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalLifecycleResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
	out := new(ReportTerminalLifecycleResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[20], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) GenerateCacheUploadURL(ctx context.Context, in *CacheKey) (*GenerateURLResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheUploadURL")
	caller := c.callGenerateCacheUploadURL
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*GenerateURLResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callGenerateCacheUploadURL(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callGenerateCacheUploadURL(ctx context.Context, in *CacheKey) (*GenerateURLResponse, error) {
	out := new(GenerateURLResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[21], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) GenerateCacheDownloadURLs(ctx context.Context, in *CacheKey) (*GenerateURLsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheDownloadURLs")
	caller := c.callGenerateCacheDownloadURLs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*GenerateURLsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callGenerateCacheDownloadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callGenerateCacheDownloadURLs(ctx context.Context, in *CacheKey) (*GenerateURLsResponse, error) {
	out := new(GenerateURLsResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[22], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) MultipartCacheUploadCreate(ctx context.Context, in *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCreate")
	caller := c.callMultipartCacheUploadCreate
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callMultipartCacheUploadCreate(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*MultipartCacheUploadCreateResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*MultipartCacheUploadCreateResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callMultipartCacheUploadCreate(ctx context.Context, in *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
	out := new(MultipartCacheUploadCreateResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[23], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) MultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadPart")
	caller := c.callMultipartCacheUploadPart
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadPartRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadPartRequest) when calling interceptor")
					}
					return c.callMultipartCacheUploadPart(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callMultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
	out := new(GenerateURLResponse)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[24], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceProtobufClient) MultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCommit")
	caller := c.callMultipartCacheUploadCommit
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadCommitRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadCommitRequest) when calling interceptor")
					}
					return c.callMultipartCacheUploadCommit(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceProtobufClient) callMultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[25], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ===========================
// CirrusCIService JSON Client
// ===========================

type cirrusCIServiceJSONClient struct {
	client      HTTPClient
	urls        [26]string
	interceptor twirp.Interceptor
	opts        twirp.ClientOptions
}

// NewCirrusCIServiceJSONClient creates a JSON client that implements the CirrusCIService interface.
// It communicates using JSON and can be configured with a custom HTTPClient.
func NewCirrusCIServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) CirrusCIService {
	if c, ok := client.(*http.Client); ok {
		client = withoutRedirects(c)
	}

	clientOpts := twirp.ClientOptions{}
	for _, o := range opts {
		o(&clientOpts)
	}

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	literalURLs := false
	_ = clientOpts.ReadOpt("literalURLs", &literalURLs)
	var pathPrefix string
	if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	// Build method URLs: <baseURL>[<prefix>]/<package>.<Service>/<Method>
	serviceURL := sanitizeBaseURL(baseURL)
	serviceURL += baseServicePath(pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusCIService")
	urls := [26]string{
		serviceURL + "InitialCommands",
		serviceURL + "ReportCommandUpdates",
		serviceURL + "ReportAnnotations",
		serviceURL + "StreamLogs",
		serviceURL + "SaveLogs",
		serviceURL + "UploadCache",
		serviceURL + "UploadArtifacts",
		serviceURL + "GenerateArtifactUploadURLs",
		serviceURL + "CommitUploadedArtifacts",
		serviceURL + "DownloadCache",
		serviceURL + "CacheInfo",
		serviceURL + "DeleteCache",
		serviceURL + "Heartbeat",
		serviceURL + "ReportStopHook",
		serviceURL + "ReportAgentError",
		serviceURL + "ReportAgentWarning",
		serviceURL + "ReportAgentSignal",
		serviceURL + "ReportAgentLogs",
		serviceURL + "ReportAgentFinished",
		serviceURL + "ReportTerminalAttached",
		serviceURL + "ReportTerminalLifecycle",
		serviceURL + "GenerateCacheUploadURL",
		serviceURL + "GenerateCacheDownloadURLs",
		serviceURL + "MultipartCacheUploadCreate",
		serviceURL + "MultipartCacheUploadPart",
		serviceURL + "MultipartCacheUploadCommit",
	}

	return &cirrusCIServiceJSONClient{
		client:      client,
		urls:        urls,
		interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...),
		opts:        clientOpts,
	}
}

func (c *cirrusCIServiceJSONClient) InitialCommands(ctx context.Context, in *InitialCommandsRequest) (*CommandsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "InitialCommands")
	caller := c.callInitialCommands
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *InitialCommandsRequest) (*CommandsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*InitialCommandsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*InitialCommandsRequest) when calling interceptor")
					}
					return c.callInitialCommands(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommandsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommandsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callInitialCommands(ctx context.Context, in *InitialCommandsRequest) (*CommandsResponse, error) {
	out := new(CommandsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportCommandUpdates")
	caller := c.callReportCommandUpdates
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportCommandUpdatesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportCommandUpdatesRequest) when calling interceptor")
					}
					return c.callReportCommandUpdates(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportCommandUpdatesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportCommandUpdatesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
	out := new(ReportCommandUpdatesResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAnnotations")
	caller := c.callReportAnnotations
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAnnotationsCommandRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAnnotationsCommandRequest) when calling interceptor")
					}
					return c.callReportAnnotations(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) StreamLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "StreamLogs")
	caller := c.callStreamLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return c.callStreamLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callStreamLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	out := new(UploadLogsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) SaveLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "SaveLogs")
	caller := c.callSaveLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return c.callSaveLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callSaveLogs(ctx context.Context, in *LogEntry) (*UploadLogsResponse, error) {
	out := new(UploadLogsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) UploadCache(ctx context.Context, in *CacheEntry) (*UploadCacheResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "UploadCache")
	caller := c.callUploadCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheEntry) (*UploadCacheResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheEntry) when calling interceptor")
					}
					return c.callUploadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callUploadCache(ctx context.Context, in *CacheEntry) (*UploadCacheResponse, error) {
	out := new(UploadCacheResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) UploadArtifacts(ctx context.Context, in *ArtifactEntry) (*UploadArtifactsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "UploadArtifacts")
	caller := c.callUploadArtifacts
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ArtifactEntry) (*UploadArtifactsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ArtifactEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ArtifactEntry) when calling interceptor")
					}
					return c.callUploadArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callUploadArtifacts(ctx context.Context, in *ArtifactEntry) (*UploadArtifactsResponse, error) {
	out := new(UploadArtifactsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[6], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) GenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateArtifactUploadURLs")
	caller := c.callGenerateArtifactUploadURLs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*GenerateArtifactUploadURLsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*GenerateArtifactUploadURLsRequest) when calling interceptor")
					}
					return c.callGenerateArtifactUploadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateArtifactUploadURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateArtifactUploadURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callGenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
	out := new(GenerateArtifactUploadURLsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[7], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) CommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "CommitUploadedArtifacts")
	caller := c.callCommitUploadedArtifacts
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CommitUploadedArtifactsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CommitUploadedArtifactsRequest) when calling interceptor")
					}
					return c.callCommitUploadedArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommitUploadedArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommitUploadedArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callCommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
	out := new(CommitUploadedArtifactsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[8], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) DownloadCache(ctx context.Context, in *DownloadCacheRequest) (*DataChunk, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "DownloadCache")
	caller := c.callDownloadCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *DownloadCacheRequest) (*DataChunk, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DownloadCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DownloadCacheRequest) when calling interceptor")
					}
					return c.callDownloadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DataChunk)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DataChunk) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callDownloadCache(ctx context.Context, in *DownloadCacheRequest) (*DataChunk, error) {
	out := new(DataChunk)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[9], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) CacheInfo(ctx context.Context, in *CacheInfoRequest) (*CacheInfoResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "CacheInfo")
	caller := c.callCacheInfo
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheInfoRequest) (*CacheInfoResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheInfoRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheInfoRequest) when calling interceptor")
					}
					return c.callCacheInfo(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CacheInfoResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CacheInfoResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callCacheInfo(ctx context.Context, in *CacheInfoRequest) (*CacheInfoResponse, error) {
	out := new(CacheInfoResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[10], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) DeleteCache(ctx context.Context, in *DeleteCacheRequest) (*DeleteCacheResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "DeleteCache")
	caller := c.callDeleteCache
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *DeleteCacheRequest) (*DeleteCacheResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DeleteCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DeleteCacheRequest) when calling interceptor")
					}
					return c.callDeleteCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DeleteCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DeleteCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callDeleteCache(ctx context.Context, in *DeleteCacheRequest) (*DeleteCacheResponse, error) {
	out := new(DeleteCacheResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[11], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) Heartbeat(ctx context.Context, in *HeartbeatRequest) (*HeartbeatResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "Heartbeat")
	caller := c.callHeartbeat
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *HeartbeatRequest) (*HeartbeatResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*HeartbeatRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*HeartbeatRequest) when calling interceptor")
					}
					return c.callHeartbeat(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*HeartbeatResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*HeartbeatResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callHeartbeat(ctx context.Context, in *HeartbeatRequest) (*HeartbeatResponse, error) {
	out := new(HeartbeatResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[12], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportStopHook(ctx context.Context, in *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportStopHook")
	caller := c.callReportStopHook
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportStopHookRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportStopHookRequest) when calling interceptor")
					}
					return c.callReportStopHook(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportStopHook(ctx context.Context, in *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[13], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAgentError(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentError")
	caller := c.callReportAgentError
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return c.callReportAgentError(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAgentError(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[14], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentWarning")
	caller := c.callReportAgentWarning
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return c.callReportAgentWarning(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[15], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentSignal")
	caller := c.callReportAgentSignal
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentSignalRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentSignalRequest) when calling interceptor")
					}
					return c.callReportAgentSignal(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[16], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentLogs")
	caller := c.callReportAgentLogs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentLogsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentLogsRequest) when calling interceptor")
					}
					return c.callReportAgentLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[17], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentFinished")
	caller := c.callReportAgentFinished
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentFinishedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentFinishedRequest) when calling interceptor")
					}
					return c.callReportAgentFinished(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportAgentFinishedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportAgentFinishedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
	out := new(ReportAgentFinishedResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[18], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalAttached")
	caller := c.callReportTerminalAttached
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalAttachedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalAttachedRequest) when calling interceptor")
					}
					return c.callReportTerminalAttached(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalAttachedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalAttachedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
	out := new(ReportTerminalAttachedResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[19], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) ReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalLifecycle")
	caller := c.callReportTerminalLifecycle
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalLifecycleRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalLifecycleRequest) when calling interceptor")
					}
					return c.callReportTerminalLifecycle(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalLifecycleResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalLifecycleResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
	out := new(ReportTerminalLifecycleResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[20], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) GenerateCacheUploadURL(ctx context.Context, in *CacheKey) (*GenerateURLResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheUploadURL")
	caller := c.callGenerateCacheUploadURL
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*GenerateURLResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callGenerateCacheUploadURL(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callGenerateCacheUploadURL(ctx context.Context, in *CacheKey) (*GenerateURLResponse, error) {
	out := new(GenerateURLResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[21], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) GenerateCacheDownloadURLs(ctx context.Context, in *CacheKey) (*GenerateURLsResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheDownloadURLs")
	caller := c.callGenerateCacheDownloadURLs
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*GenerateURLsResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callGenerateCacheDownloadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callGenerateCacheDownloadURLs(ctx context.Context, in *CacheKey) (*GenerateURLsResponse, error) {
	out := new(GenerateURLsResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[22], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) MultipartCacheUploadCreate(ctx context.Context, in *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCreate")
	caller := c.callMultipartCacheUploadCreate
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return c.callMultipartCacheUploadCreate(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*MultipartCacheUploadCreateResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*MultipartCacheUploadCreateResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callMultipartCacheUploadCreate(ctx context.Context, in *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
	out := new(MultipartCacheUploadCreateResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[23], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) MultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadPart")
	caller := c.callMultipartCacheUploadPart
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadPartRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadPartRequest) when calling interceptor")
					}
					return c.callMultipartCacheUploadPart(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callMultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
	out := new(GenerateURLResponse)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[24], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

func (c *cirrusCIServiceJSONClient) MultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCommit")
	caller := c.callMultipartCacheUploadCommit
	if c.interceptor != nil {
		caller = func(ctx context.Context, req *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
			resp, err := c.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadCommitRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadCommitRequest) when calling interceptor")
					}
					return c.callMultipartCacheUploadCommit(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}
	return caller(ctx, in)
}

func (c *cirrusCIServiceJSONClient) callMultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[25], in, out)
	if err != nil {
		twerr, ok := err.(twirp.Error)
		if !ok {
			twerr = twirp.InternalErrorWith(err)
		}
		callClientError(ctx, c.opts.Hooks, twerr)
		return nil, err
	}

	callClientResponseReceived(ctx, c.opts.Hooks)

	return out, nil
}

// ==============================
// CirrusCIService Server Handler
// ==============================

type cirrusCIServiceServer struct {
	CirrusCIService
	interceptor      twirp.Interceptor
	hooks            *twirp.ServerHooks
	pathPrefix       string // prefix for routing
	jsonSkipDefaults bool   // do not include unpopulated fields (default values) in the response
	jsonCamelCase    bool   // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names
}

// NewCirrusCIServiceServer builds a TwirpServer that can be used as an http.Handler to handle
// HTTP requests that are routed to the right method in the provided svc implementation.
// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).
func NewCirrusCIServiceServer(svc CirrusCIService, opts ...interface{}) TwirpServer {
	serverOpts := newServerOpts(opts)

	// Using ReadOpt allows backwards and forwards compatibility with new options in the future
	jsonSkipDefaults := false
	_ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults)
	jsonCamelCase := false
	_ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase)
	var pathPrefix string
	if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok {
		pathPrefix = "/twirp" // default prefix
	}

	return &cirrusCIServiceServer{
		CirrusCIService:  svc,
		hooks:            serverOpts.Hooks,
		interceptor:      twirp.ChainInterceptors(serverOpts.Interceptors...),
		pathPrefix:       pathPrefix,
		jsonSkipDefaults: jsonSkipDefaults,
		jsonCamelCase:    jsonCamelCase,
	}
}

// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks.
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
func (s *cirrusCIServiceServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) {
	writeError(ctx, resp, err, s.hooks)
}

// handleRequestBodyError is used to handle error when the twirp server cannot read request
func (s *cirrusCIServiceServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) {
	if context.Canceled == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled"))
		return
	}
	if context.DeadlineExceeded == ctx.Err() {
		s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded"))
		return
	}
	s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err))
}

// CirrusCIServicePathPrefix is a convenience constant that may identify URL paths.
// Should be used with caution, it only matches routes generated by Twirp Go clients,
// with the default "/twirp" prefix and default CamelCase service and method names.
// More info: https://twitchtv.github.io/twirp/docs/routing.html
const CirrusCIServicePathPrefix = "/twirp/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/"

func (s *cirrusCIServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
	ctx := req.Context()
	ctx = ctxsetters.WithPackageName(ctx, "org.cirruslabs.ci.services.cirruscigrpc")
	ctx = ctxsetters.WithServiceName(ctx, "CirrusCIService")
	ctx = ctxsetters.WithResponseWriter(ctx, resp)

	var err error
	ctx, err = callRequestReceived(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	if req.Method != "POST" {
		msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	// Verify path format: [<prefix>]/<package>.<Service>/<Method>
	prefix, pkgService, method := parseTwirpPath(req.URL.Path)
	if pkgService != "org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService" {
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
	if prefix != s.pathPrefix {
		msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}

	switch method {
	case "InitialCommands":
		s.serveInitialCommands(ctx, resp, req)
		return
	case "ReportCommandUpdates":
		s.serveReportCommandUpdates(ctx, resp, req)
		return
	case "ReportAnnotations":
		s.serveReportAnnotations(ctx, resp, req)
		return
	case "StreamLogs":
		s.serveStreamLogs(ctx, resp, req)
		return
	case "SaveLogs":
		s.serveSaveLogs(ctx, resp, req)
		return
	case "UploadCache":
		s.serveUploadCache(ctx, resp, req)
		return
	case "UploadArtifacts":
		s.serveUploadArtifacts(ctx, resp, req)
		return
	case "GenerateArtifactUploadURLs":
		s.serveGenerateArtifactUploadURLs(ctx, resp, req)
		return
	case "CommitUploadedArtifacts":
		s.serveCommitUploadedArtifacts(ctx, resp, req)
		return
	case "DownloadCache":
		s.serveDownloadCache(ctx, resp, req)
		return
	case "CacheInfo":
		s.serveCacheInfo(ctx, resp, req)
		return
	case "DeleteCache":
		s.serveDeleteCache(ctx, resp, req)
		return
	case "Heartbeat":
		s.serveHeartbeat(ctx, resp, req)
		return
	case "ReportStopHook":
		s.serveReportStopHook(ctx, resp, req)
		return
	case "ReportAgentError":
		s.serveReportAgentError(ctx, resp, req)
		return
	case "ReportAgentWarning":
		s.serveReportAgentWarning(ctx, resp, req)
		return
	case "ReportAgentSignal":
		s.serveReportAgentSignal(ctx, resp, req)
		return
	case "ReportAgentLogs":
		s.serveReportAgentLogs(ctx, resp, req)
		return
	case "ReportAgentFinished":
		s.serveReportAgentFinished(ctx, resp, req)
		return
	case "ReportTerminalAttached":
		s.serveReportTerminalAttached(ctx, resp, req)
		return
	case "ReportTerminalLifecycle":
		s.serveReportTerminalLifecycle(ctx, resp, req)
		return
	case "GenerateCacheUploadURL":
		s.serveGenerateCacheUploadURL(ctx, resp, req)
		return
	case "GenerateCacheDownloadURLs":
		s.serveGenerateCacheDownloadURLs(ctx, resp, req)
		return
	case "MultipartCacheUploadCreate":
		s.serveMultipartCacheUploadCreate(ctx, resp, req)
		return
	case "MultipartCacheUploadPart":
		s.serveMultipartCacheUploadPart(ctx, resp, req)
		return
	case "MultipartCacheUploadCommit":
		s.serveMultipartCacheUploadCommit(ctx, resp, req)
		return
	default:
		msg := fmt.Sprintf("no handler for path %q", req.URL.Path)
		s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path))
		return
	}
}

func (s *cirrusCIServiceServer) serveInitialCommands(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveInitialCommandsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveInitialCommandsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveInitialCommandsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "InitialCommands")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(InitialCommandsRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.InitialCommands
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *InitialCommandsRequest) (*CommandsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*InitialCommandsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*InitialCommandsRequest) when calling interceptor")
					}
					return s.CirrusCIService.InitialCommands(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommandsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommandsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CommandsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CommandsResponse and nil error while calling InitialCommands. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveInitialCommandsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "InitialCommands")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(InitialCommandsRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.InitialCommands
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *InitialCommandsRequest) (*CommandsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*InitialCommandsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*InitialCommandsRequest) when calling interceptor")
					}
					return s.CirrusCIService.InitialCommands(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommandsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommandsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CommandsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CommandsResponse and nil error while calling InitialCommands. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportCommandUpdates(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportCommandUpdatesJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportCommandUpdatesProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportCommandUpdatesJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportCommandUpdates")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportCommandUpdatesRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportCommandUpdates
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportCommandUpdatesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportCommandUpdatesRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportCommandUpdates(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportCommandUpdatesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportCommandUpdatesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportCommandUpdatesResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportCommandUpdatesResponse and nil error while calling ReportCommandUpdates. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportCommandUpdatesProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportCommandUpdates")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportCommandUpdatesRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportCommandUpdates
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportCommandUpdatesRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportCommandUpdatesRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportCommandUpdates(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportCommandUpdatesResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportCommandUpdatesResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportCommandUpdatesResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportCommandUpdatesResponse and nil error while calling ReportCommandUpdates. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAnnotations(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAnnotationsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAnnotationsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAnnotationsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAnnotations")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAnnotationsCommandRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAnnotations
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAnnotationsCommandRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAnnotationsCommandRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAnnotations(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAnnotations. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAnnotationsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAnnotations")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAnnotationsCommandRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAnnotations
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAnnotationsCommandRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAnnotationsCommandRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAnnotationsCommandRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAnnotations(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAnnotations. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveStreamLogs(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveStreamLogsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveStreamLogsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveStreamLogsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "StreamLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(LogEntry)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.StreamLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return s.CirrusCIService.StreamLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadLogsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadLogsResponse and nil error while calling StreamLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveStreamLogsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "StreamLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(LogEntry)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.StreamLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return s.CirrusCIService.StreamLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadLogsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadLogsResponse and nil error while calling StreamLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveSaveLogs(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveSaveLogsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveSaveLogsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveSaveLogsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "SaveLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(LogEntry)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.SaveLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return s.CirrusCIService.SaveLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadLogsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadLogsResponse and nil error while calling SaveLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveSaveLogsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "SaveLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(LogEntry)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.SaveLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *LogEntry) (*UploadLogsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*LogEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*LogEntry) when calling interceptor")
					}
					return s.CirrusCIService.SaveLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadLogsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadLogsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadLogsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadLogsResponse and nil error while calling SaveLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveUploadCache(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveUploadCacheJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveUploadCacheProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveUploadCacheJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UploadCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CacheEntry)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.UploadCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheEntry) (*UploadCacheResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheEntry) when calling interceptor")
					}
					return s.CirrusCIService.UploadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadCacheResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadCacheResponse and nil error while calling UploadCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveUploadCacheProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UploadCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CacheEntry)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.UploadCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheEntry) (*UploadCacheResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheEntry) when calling interceptor")
					}
					return s.CirrusCIService.UploadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadCacheResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadCacheResponse and nil error while calling UploadCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveUploadArtifacts(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveUploadArtifactsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveUploadArtifactsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveUploadArtifactsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UploadArtifacts")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ArtifactEntry)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.UploadArtifacts
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ArtifactEntry) (*UploadArtifactsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ArtifactEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ArtifactEntry) when calling interceptor")
					}
					return s.CirrusCIService.UploadArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadArtifactsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadArtifactsResponse and nil error while calling UploadArtifacts. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveUploadArtifactsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "UploadArtifacts")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ArtifactEntry)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.UploadArtifacts
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ArtifactEntry) (*UploadArtifactsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ArtifactEntry)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ArtifactEntry) when calling interceptor")
					}
					return s.CirrusCIService.UploadArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*UploadArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*UploadArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *UploadArtifactsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *UploadArtifactsResponse and nil error while calling UploadArtifacts. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateArtifactUploadURLs(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveGenerateArtifactUploadURLsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveGenerateArtifactUploadURLsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveGenerateArtifactUploadURLsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateArtifactUploadURLs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(GenerateArtifactUploadURLsRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.GenerateArtifactUploadURLs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*GenerateArtifactUploadURLsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*GenerateArtifactUploadURLsRequest) when calling interceptor")
					}
					return s.CirrusCIService.GenerateArtifactUploadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateArtifactUploadURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateArtifactUploadURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateArtifactUploadURLsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateArtifactUploadURLsResponse and nil error while calling GenerateArtifactUploadURLs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateArtifactUploadURLsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateArtifactUploadURLs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(GenerateArtifactUploadURLsRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.GenerateArtifactUploadURLs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*GenerateArtifactUploadURLsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*GenerateArtifactUploadURLsRequest) when calling interceptor")
					}
					return s.CirrusCIService.GenerateArtifactUploadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateArtifactUploadURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateArtifactUploadURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateArtifactUploadURLsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateArtifactUploadURLsResponse and nil error while calling GenerateArtifactUploadURLs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveCommitUploadedArtifacts(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveCommitUploadedArtifactsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveCommitUploadedArtifactsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveCommitUploadedArtifactsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "CommitUploadedArtifacts")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CommitUploadedArtifactsRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.CommitUploadedArtifacts
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CommitUploadedArtifactsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CommitUploadedArtifactsRequest) when calling interceptor")
					}
					return s.CirrusCIService.CommitUploadedArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommitUploadedArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommitUploadedArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CommitUploadedArtifactsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CommitUploadedArtifactsResponse and nil error while calling CommitUploadedArtifacts. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveCommitUploadedArtifactsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "CommitUploadedArtifacts")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CommitUploadedArtifactsRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.CommitUploadedArtifacts
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CommitUploadedArtifactsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CommitUploadedArtifactsRequest) when calling interceptor")
					}
					return s.CirrusCIService.CommitUploadedArtifacts(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CommitUploadedArtifactsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CommitUploadedArtifactsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CommitUploadedArtifactsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CommitUploadedArtifactsResponse and nil error while calling CommitUploadedArtifacts. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveDownloadCache(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveDownloadCacheJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveDownloadCacheProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveDownloadCacheJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "DownloadCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(DownloadCacheRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.DownloadCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *DownloadCacheRequest) (*DataChunk, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DownloadCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DownloadCacheRequest) when calling interceptor")
					}
					return s.CirrusCIService.DownloadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DataChunk)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DataChunk) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *DataChunk
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *DataChunk and nil error while calling DownloadCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveDownloadCacheProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "DownloadCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(DownloadCacheRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.DownloadCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *DownloadCacheRequest) (*DataChunk, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DownloadCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DownloadCacheRequest) when calling interceptor")
					}
					return s.CirrusCIService.DownloadCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DataChunk)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DataChunk) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *DataChunk
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *DataChunk and nil error while calling DownloadCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveCacheInfo(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveCacheInfoJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveCacheInfoProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveCacheInfoJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "CacheInfo")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CacheInfoRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.CacheInfo
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheInfoRequest) (*CacheInfoResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheInfoRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheInfoRequest) when calling interceptor")
					}
					return s.CirrusCIService.CacheInfo(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CacheInfoResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CacheInfoResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CacheInfoResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CacheInfoResponse and nil error while calling CacheInfo. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveCacheInfoProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "CacheInfo")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CacheInfoRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.CacheInfo
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheInfoRequest) (*CacheInfoResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheInfoRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheInfoRequest) when calling interceptor")
					}
					return s.CirrusCIService.CacheInfo(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*CacheInfoResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*CacheInfoResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *CacheInfoResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *CacheInfoResponse and nil error while calling CacheInfo. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveDeleteCache(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveDeleteCacheJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveDeleteCacheProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveDeleteCacheJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "DeleteCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(DeleteCacheRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.DeleteCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *DeleteCacheRequest) (*DeleteCacheResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DeleteCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DeleteCacheRequest) when calling interceptor")
					}
					return s.CirrusCIService.DeleteCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DeleteCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DeleteCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *DeleteCacheResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteCacheResponse and nil error while calling DeleteCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveDeleteCacheProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "DeleteCache")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(DeleteCacheRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.DeleteCache
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *DeleteCacheRequest) (*DeleteCacheResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*DeleteCacheRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*DeleteCacheRequest) when calling interceptor")
					}
					return s.CirrusCIService.DeleteCache(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*DeleteCacheResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*DeleteCacheResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *DeleteCacheResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteCacheResponse and nil error while calling DeleteCache. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveHeartbeat(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveHeartbeatJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveHeartbeatProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveHeartbeatJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Heartbeat")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(HeartbeatRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.Heartbeat
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *HeartbeatRequest) (*HeartbeatResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*HeartbeatRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*HeartbeatRequest) when calling interceptor")
					}
					return s.CirrusCIService.Heartbeat(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*HeartbeatResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*HeartbeatResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *HeartbeatResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *HeartbeatResponse and nil error while calling Heartbeat. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveHeartbeatProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "Heartbeat")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(HeartbeatRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.Heartbeat
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *HeartbeatRequest) (*HeartbeatResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*HeartbeatRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*HeartbeatRequest) when calling interceptor")
					}
					return s.CirrusCIService.Heartbeat(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*HeartbeatResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*HeartbeatResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *HeartbeatResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *HeartbeatResponse and nil error while calling Heartbeat. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportStopHook(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportStopHookJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportStopHookProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportStopHookJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportStopHook")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportStopHookRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportStopHook
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportStopHookRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportStopHookRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportStopHook(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportStopHook. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportStopHookProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportStopHook")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportStopHookRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportStopHook
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportStopHookRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportStopHookRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportStopHookRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportStopHook(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportStopHook. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentError(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAgentErrorJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAgentErrorProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAgentErrorJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentError")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAgentProblemRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAgentError
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentError(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentError. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentErrorProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentError")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAgentProblemRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAgentError
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentError(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentError. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentWarning(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAgentWarningJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAgentWarningProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAgentWarningJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentWarning")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAgentProblemRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAgentWarning
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentWarning(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentWarning. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentWarningProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentWarning")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAgentProblemRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAgentWarning
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentProblemRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentProblemRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentProblemRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentWarning(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentWarning. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentSignal(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAgentSignalJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAgentSignalProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAgentSignalJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentSignal")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAgentSignalRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAgentSignal
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentSignalRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentSignalRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentSignal(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentSignal. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentSignalProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentSignal")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAgentSignalRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAgentSignal
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentSignalRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentSignalRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentSignalRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentSignal(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentSignal. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentLogs(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAgentLogsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAgentLogsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAgentLogsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAgentLogsRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAgentLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentLogsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentLogsRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentLogsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentLogs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAgentLogsRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAgentLogs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentLogsRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentLogsRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentLogsRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentLogs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling ReportAgentLogs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentFinished(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportAgentFinishedJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportAgentFinishedProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportAgentFinishedJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentFinished")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportAgentFinishedRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportAgentFinished
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentFinishedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentFinishedRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentFinished(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportAgentFinishedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportAgentFinishedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportAgentFinishedResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportAgentFinishedResponse and nil error while calling ReportAgentFinished. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportAgentFinishedProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportAgentFinished")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportAgentFinishedRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportAgentFinished
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportAgentFinishedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportAgentFinishedRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportAgentFinished(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportAgentFinishedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportAgentFinishedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportAgentFinishedResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportAgentFinishedResponse and nil error while calling ReportAgentFinished. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportTerminalAttached(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportTerminalAttachedJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportTerminalAttachedProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportTerminalAttachedJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalAttached")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportTerminalAttachedRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportTerminalAttached
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalAttachedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalAttachedRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportTerminalAttached(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalAttachedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalAttachedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportTerminalAttachedResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportTerminalAttachedResponse and nil error while calling ReportTerminalAttached. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportTerminalAttachedProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalAttached")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportTerminalAttachedRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportTerminalAttached
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalAttachedRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalAttachedRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportTerminalAttached(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalAttachedResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalAttachedResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportTerminalAttachedResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportTerminalAttachedResponse and nil error while calling ReportTerminalAttached. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportTerminalLifecycle(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveReportTerminalLifecycleJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveReportTerminalLifecycleProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveReportTerminalLifecycleJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalLifecycle")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(ReportTerminalLifecycleRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.ReportTerminalLifecycle
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalLifecycleRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalLifecycleRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportTerminalLifecycle(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalLifecycleResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalLifecycleResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportTerminalLifecycleResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportTerminalLifecycleResponse and nil error while calling ReportTerminalLifecycle. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveReportTerminalLifecycleProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "ReportTerminalLifecycle")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(ReportTerminalLifecycleRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.ReportTerminalLifecycle
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*ReportTerminalLifecycleRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*ReportTerminalLifecycleRequest) when calling interceptor")
					}
					return s.CirrusCIService.ReportTerminalLifecycle(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*ReportTerminalLifecycleResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*ReportTerminalLifecycleResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *ReportTerminalLifecycleResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *ReportTerminalLifecycleResponse and nil error while calling ReportTerminalLifecycle. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateCacheUploadURL(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveGenerateCacheUploadURLJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveGenerateCacheUploadURLProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveGenerateCacheUploadURLJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheUploadURL")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CacheKey)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.GenerateCacheUploadURL
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*GenerateURLResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.GenerateCacheUploadURL(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLResponse and nil error while calling GenerateCacheUploadURL. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateCacheUploadURLProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheUploadURL")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CacheKey)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.GenerateCacheUploadURL
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*GenerateURLResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.GenerateCacheUploadURL(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLResponse and nil error while calling GenerateCacheUploadURL. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateCacheDownloadURLs(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveGenerateCacheDownloadURLsJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveGenerateCacheDownloadURLsProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveGenerateCacheDownloadURLsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheDownloadURLs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CacheKey)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.GenerateCacheDownloadURLs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*GenerateURLsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.GenerateCacheDownloadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLsResponse and nil error while calling GenerateCacheDownloadURLs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveGenerateCacheDownloadURLsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "GenerateCacheDownloadURLs")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CacheKey)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.GenerateCacheDownloadURLs
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*GenerateURLsResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.GenerateCacheDownloadURLs(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLsResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLsResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLsResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLsResponse and nil error while calling GenerateCacheDownloadURLs. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCreate(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveMultipartCacheUploadCreateJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveMultipartCacheUploadCreateProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCreateJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCreate")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(CacheKey)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadCreate
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadCreate(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*MultipartCacheUploadCreateResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*MultipartCacheUploadCreateResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *MultipartCacheUploadCreateResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *MultipartCacheUploadCreateResponse and nil error while calling MultipartCacheUploadCreate. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCreateProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCreate")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(CacheKey)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadCreate
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*CacheKey)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*CacheKey) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadCreate(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*MultipartCacheUploadCreateResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*MultipartCacheUploadCreateResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *MultipartCacheUploadCreateResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *MultipartCacheUploadCreateResponse and nil error while calling MultipartCacheUploadCreate. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadPart(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveMultipartCacheUploadPartJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveMultipartCacheUploadPartProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadPartJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadPart")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(MultipartCacheUploadPartRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadPart
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadPartRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadPartRequest) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadPart(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLResponse and nil error while calling MultipartCacheUploadPart. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadPartProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadPart")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(MultipartCacheUploadPartRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadPart
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadPartRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadPartRequest) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadPart(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*GenerateURLResponse)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*GenerateURLResponse) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *GenerateURLResponse
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *GenerateURLResponse and nil error while calling MultipartCacheUploadPart. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCommit(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	header := req.Header.Get("Content-Type")
	i := strings.Index(header, ";")
	if i == -1 {
		i = len(header)
	}
	switch strings.TrimSpace(strings.ToLower(header[:i])) {
	case "application/json":
		s.serveMultipartCacheUploadCommitJSON(ctx, resp, req)
	case "application/protobuf":
		s.serveMultipartCacheUploadCommitProtobuf(ctx, resp, req)
	default:
		msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type"))
		twerr := badRouteError(msg, req.Method, req.URL.Path)
		s.writeError(ctx, resp, twerr)
	}
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCommitJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCommit")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	d := json.NewDecoder(req.Body)
	rawReqBody := json.RawMessage{}
	if err := d.Decode(&rawReqBody); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}
	reqContent := new(MultipartCacheUploadCommitRequest)
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil {
		s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err)
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadCommit
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadCommitRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadCommitRequest) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadCommit(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling MultipartCacheUploadCommit. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults}
	respBytes, err := marshaler.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/json")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)

	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) serveMultipartCacheUploadCommitProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) {
	var err error
	ctx = ctxsetters.WithMethodName(ctx, "MultipartCacheUploadCommit")
	ctx, err = callRequestRouted(ctx, s.hooks)
	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}

	buf, err := io.ReadAll(req.Body)
	if err != nil {
		s.handleRequestBodyError(ctx, resp, "failed to read request body", err)
		return
	}
	reqContent := new(MultipartCacheUploadCommitRequest)
	if err = proto.Unmarshal(buf, reqContent); err != nil {
		s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded"))
		return
	}

	handler := s.CirrusCIService.MultipartCacheUploadCommit
	if s.interceptor != nil {
		handler = func(ctx context.Context, req *MultipartCacheUploadCommitRequest) (*google_protobuf1.Empty, error) {
			resp, err := s.interceptor(
				func(ctx context.Context, req interface{}) (interface{}, error) {
					typedReq, ok := req.(*MultipartCacheUploadCommitRequest)
					if !ok {
						return nil, twirp.InternalError("failed type assertion req.(*MultipartCacheUploadCommitRequest) when calling interceptor")
					}
					return s.CirrusCIService.MultipartCacheUploadCommit(ctx, typedReq)
				},
			)(ctx, req)
			if resp != nil {
				typedResp, ok := resp.(*google_protobuf1.Empty)
				if !ok {
					return nil, twirp.InternalError("failed type assertion resp.(*google_protobuf1.Empty) when calling interceptor")
				}
				return typedResp, err
			}
			return nil, err
		}
	}

	// Call service method
	var respContent *google_protobuf1.Empty
	func() {
		defer ensurePanicResponses(ctx, resp, s.hooks)
		respContent, err = handler(ctx, reqContent)
	}()

	if err != nil {
		s.writeError(ctx, resp, err)
		return
	}
	if respContent == nil {
		s.writeError(ctx, resp, twirp.InternalError("received a nil *google_protobuf1.Empty and nil error while calling MultipartCacheUploadCommit. nil responses are not supported"))
		return
	}

	ctx = callResponsePrepared(ctx, s.hooks)

	respBytes, err := proto.Marshal(respContent)
	if err != nil {
		s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response"))
		return
	}

	ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK)
	resp.Header().Set("Content-Type", "application/protobuf")
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes)))
	resp.WriteHeader(http.StatusOK)
	if n, err := resp.Write(respBytes); err != nil {
		msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error())
		twerr := twirp.NewError(twirp.Unknown, msg)
		ctx = callError(ctx, s.hooks, twerr)
	}
	callResponseSent(ctx, s.hooks)
}

func (s *cirrusCIServiceServer) ServiceDescriptor() ([]byte, int) {
	return twirpFileDescriptor0, 3
}

func (s *cirrusCIServiceServer) ProtocGenTwirpVersion() string {
	return "v8.1.3"
}

// PathPrefix returns the base service path, in the form: "/<prefix>/<package>.<Service>/"
// that is everything in a Twirp route except for the <Method>. This can be used for routing,
// for example to identify the requests that are targeted to this service in a mux.
func (s *cirrusCIServiceServer) PathPrefix() string {
	return baseServicePath(s.pathPrefix, "org.cirruslabs.ci.services.cirruscigrpc", "CirrusCIService")
}

// =====
// Utils
// =====

// HTTPClient is the interface used by generated clients to send HTTP requests.
// It is fulfilled by *(net/http).Client, which is sufficient for most users.
// Users can provide their own implementation for special retry policies.
//
// HTTPClient implementations should not follow redirects. Redirects are
// automatically disabled if *(net/http).Client is passed to client
// constructors. See the withoutRedirects function in this file for more
// details.
type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

// TwirpServer is the interface generated server structs will support: they're
// HTTP handlers with additional methods for accessing metadata about the
// service. Those accessors are a low-level API for building reflection tools.
// Most people can think of TwirpServers as just http.Handlers.
type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

func newServerOpts(opts []interface{}) *twirp.ServerOptions {
	serverOpts := &twirp.ServerOptions{}
	for _, opt := range opts {
		switch o := opt.(type) {
		case twirp.ServerOption:
			o(serverOpts)
		case *twirp.ServerHooks: // backwards compatibility, allow to specify hooks as an argument
			twirp.WithServerHooks(o)(serverOpts)
		case nil: // backwards compatibility, allow nil value for the argument
			continue
		default:
			panic(fmt.Sprintf("Invalid option type %T, please use a twirp.ServerOption", o))
		}
	}
	return serverOpts
}

// WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta).
// Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks.
// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
func WriteError(resp http.ResponseWriter, err error) {
	writeError(context.Background(), resp, err, nil)
}

// writeError writes Twirp errors in the response and triggers hooks.
func writeError(ctx context.Context, resp http.ResponseWriter, err error, hooks *twirp.ServerHooks) {
	// Convert to a twirp.Error. Non-twirp errors are converted to internal errors.
	var twerr twirp.Error
	if !errors.As(err, &twerr) {
		twerr = twirp.InternalErrorWith(err)
	}

	statusCode := twirp.ServerHTTPStatusFromErrorCode(twerr.Code())
	ctx = ctxsetters.WithStatusCode(ctx, statusCode)
	ctx = callError(ctx, hooks, twerr)

	respBody := marshalErrorToJSON(twerr)

	resp.Header().Set("Content-Type", "application/json") // Error responses are always JSON
	resp.Header().Set("Content-Length", strconv.Itoa(len(respBody)))
	resp.WriteHeader(statusCode) // set HTTP status code and send response

	_, writeErr := resp.Write(respBody)
	if writeErr != nil {
		// We have three options here. We could log the error, call the Error
		// hook, or just silently ignore the error.
		//
		// Logging is unacceptable because we don't have a user-controlled
		// logger; writing out to stderr without permission is too rude.
		//
		// Calling the Error hook would confuse users: it would mean the Error
		// hook got called twice for one request, which is likely to lead to
		// duplicated log messages and metrics, no matter how well we document
		// the behavior.
		//
		// Silently ignoring the error is our least-bad option. It's highly
		// likely that the connection is broken and the original 'err' says
		// so anyway.
		_ = writeErr
	}

	callResponseSent(ctx, hooks)
}

// sanitizeBaseURL parses the the baseURL, and adds the "http" scheme if needed.
// If the URL is unparsable, the baseURL is returned unchanged.
func sanitizeBaseURL(baseURL string) string {
	u, err := url.Parse(baseURL)
	if err != nil {
		return baseURL // invalid URL will fail later when making requests
	}
	if u.Scheme == "" {
		u.Scheme = "http"
	}
	return u.String()
}

// baseServicePath composes the path prefix for the service (without <Method>).
// e.g.: baseServicePath("/twirp", "my.pkg", "MyService")
//
//	returns => "/twirp/my.pkg.MyService/"
//
// e.g.: baseServicePath("", "", "MyService")
//
//	returns => "/MyService/"
func baseServicePath(prefix, pkg, service string) string {
	fullServiceName := service
	if pkg != "" {
		fullServiceName = pkg + "." + service
	}
	return path.Join("/", prefix, fullServiceName) + "/"
}

// parseTwirpPath extracts path components form a valid Twirp route.
// Expected format: "[<prefix>]/<package>.<Service>/<Method>"
// e.g.: prefix, pkgService, method := parseTwirpPath("/twirp/pkg.Svc/MakeHat")
func parseTwirpPath(path string) (string, string, string) {
	parts := strings.Split(path, "/")
	if len(parts) < 2 {
		return "", "", ""
	}
	method := parts[len(parts)-1]
	pkgService := parts[len(parts)-2]
	prefix := strings.Join(parts[0:len(parts)-2], "/")
	return prefix, pkgService, method
}

// getCustomHTTPReqHeaders retrieves a copy of any headers that are set in
// a context through the twirp.WithHTTPRequestHeaders function.
// If there are no headers set, or if they have the wrong type, nil is returned.
func getCustomHTTPReqHeaders(ctx context.Context) http.Header {
	header, ok := twirp.HTTPRequestHeaders(ctx)
	if !ok || header == nil {
		return nil
	}
	copied := make(http.Header)
	for k, vv := range header {
		if vv == nil {
			copied[k] = nil
			continue
		}
		copied[k] = make([]string, len(vv))
		copy(copied[k], vv)
	}
	return copied
}

// newRequest makes an http.Request from a client, adding common headers.
func newRequest(ctx context.Context, url string, reqBody io.Reader, contentType string) (*http.Request, error) {
	req, err := http.NewRequest("POST", url, reqBody)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if customHeader := getCustomHTTPReqHeaders(ctx); customHeader != nil {
		req.Header = customHeader
	}
	req.Header.Set("Accept", contentType)
	req.Header.Set("Content-Type", contentType)
	req.Header.Set("Twirp-Version", "v8.1.3")
	return req, nil
}

// JSON serialization for errors
type twerrJSON struct {
	Code string            `json:"code"`
	Msg  string            `json:"msg"`
	Meta map[string]string `json:"meta,omitempty"`
}

// marshalErrorToJSON returns JSON from a twirp.Error, that can be used as HTTP error response body.
// If serialization fails, it will use a descriptive Internal error instead.
func marshalErrorToJSON(twerr twirp.Error) []byte {
	// make sure that msg is not too large
	msg := twerr.Msg()
	if len(msg) > 1e6 {
		msg = msg[:1e6]
	}

	tj := twerrJSON{
		Code: string(twerr.Code()),
		Msg:  msg,
		Meta: twerr.MetaMap(),
	}

	buf, err := json.Marshal(&tj)
	if err != nil {
		buf = []byte("{\"type\": \"" + twirp.Internal + "\", \"msg\": \"There was an error but it could not be serialized into JSON\"}") // fallback
	}

	return buf
}

// errorFromResponse builds a twirp.Error from a non-200 HTTP response.
// If the response has a valid serialized Twirp error, then it's returned.
// If not, the response status code is used to generate a similar twirp
// error. See twirpErrorFromIntermediary for more info on intermediary errors.
func errorFromResponse(resp *http.Response) twirp.Error {
	statusCode := resp.StatusCode
	statusText := http.StatusText(statusCode)

	if isHTTPRedirect(statusCode) {
		// Unexpected redirect: it must be an error from an intermediary.
		// Twirp clients don't follow redirects automatically, Twirp only handles
		// POST requests, redirects should only happen on GET and HEAD requests.
		location := resp.Header.Get("Location")
		msg := fmt.Sprintf("unexpected HTTP status code %d %q received, Location=%q", statusCode, statusText, location)
		return twirpErrorFromIntermediary(statusCode, msg, location)
	}

	respBodyBytes, err := io.ReadAll(resp.Body)
	if err != nil {
		return wrapInternal(err, "failed to read server error response body")
	}

	var tj twerrJSON
	dec := json.NewDecoder(bytes.NewReader(respBodyBytes))
	dec.DisallowUnknownFields()
	if err := dec.Decode(&tj); err != nil || tj.Code == "" {
		// Invalid JSON response; it must be an error from an intermediary.
		msg := fmt.Sprintf("Error from intermediary with HTTP status code %d %q", statusCode, statusText)
		return twirpErrorFromIntermediary(statusCode, msg, string(respBodyBytes))
	}

	errorCode := twirp.ErrorCode(tj.Code)
	if !twirp.IsValidErrorCode(errorCode) {
		msg := "invalid type returned from server error response: " + tj.Code
		return twirp.InternalError(msg).WithMeta("body", string(respBodyBytes))
	}

	twerr := twirp.NewError(errorCode, tj.Msg)
	for k, v := range tj.Meta {
		twerr = twerr.WithMeta(k, v)
	}
	return twerr
}

// twirpErrorFromIntermediary maps HTTP errors from non-twirp sources to twirp errors.
// The mapping is similar to gRPC: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md.
// Returned twirp Errors have some additional metadata for inspection.
func twirpErrorFromIntermediary(status int, msg string, bodyOrLocation string) twirp.Error {
	var code twirp.ErrorCode
	if isHTTPRedirect(status) { // 3xx
		code = twirp.Internal
	} else {
		switch status {
		case 400: // Bad Request
			code = twirp.Internal
		case 401: // Unauthorized
			code = twirp.Unauthenticated
		case 403: // Forbidden
			code = twirp.PermissionDenied
		case 404: // Not Found
			code = twirp.BadRoute
		case 429: // Too Many Requests
			code = twirp.ResourceExhausted
		case 502, 503, 504: // Bad Gateway, Service Unavailable, Gateway Timeout
			code = twirp.Unavailable
		default: // All other codes
			code = twirp.Unknown
		}
	}

	twerr := twirp.NewError(code, msg)
	twerr = twerr.WithMeta("http_error_from_intermediary", "true") // to easily know if this error was from intermediary
	twerr = twerr.WithMeta("status_code", strconv.Itoa(status))
	if isHTTPRedirect(status) {
		twerr = twerr.WithMeta("location", bodyOrLocation)
	} else {
		twerr = twerr.WithMeta("body", bodyOrLocation)
	}
	return twerr
}

func isHTTPRedirect(status int) bool {
	return status >= 300 && status <= 399
}

// wrapInternal wraps an error with a prefix as an Internal error.
// The original error cause is accessible by github.com/pkg/errors.Cause.
func wrapInternal(err error, prefix string) twirp.Error {
	return twirp.InternalErrorWith(&wrappedError{prefix: prefix, cause: err})
}

type wrappedError struct {
	prefix string
	cause  error
}

func (e *wrappedError) Error() string { return e.prefix + ": " + e.cause.Error() }
func (e *wrappedError) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As
func (e *wrappedError) Cause() error  { return e.cause } // for github.com/pkg/errors

// ensurePanicResponses makes sure that rpc methods causing a panic still result in a Twirp Internal
// error response (status 500), and error hooks are properly called with the panic wrapped as an error.
// The panic is re-raised so it can be handled normally with middleware.
func ensurePanicResponses(ctx context.Context, resp http.ResponseWriter, hooks *twirp.ServerHooks) {
	if r := recover(); r != nil {
		// Wrap the panic as an error so it can be passed to error hooks.
		// The original error is accessible from error hooks, but not visible in the response.
		err := errFromPanic(r)
		twerr := &internalWithCause{msg: "Internal service panic", cause: err}
		// Actually write the error
		writeError(ctx, resp, twerr, hooks)
		// If possible, flush the error to the wire.
		f, ok := resp.(http.Flusher)
		if ok {
			f.Flush()
		}

		panic(r)
	}
}

// errFromPanic returns the typed error if the recovered panic is an error, otherwise formats as error.
func errFromPanic(p interface{}) error {
	if err, ok := p.(error); ok {
		return err
	}
	return fmt.Errorf("panic: %v", p)
}

// internalWithCause is a Twirp Internal error wrapping an original error cause,
// but the original error message is not exposed on Msg(). The original error
// can be checked with go1.13+ errors.Is/As, and also by (github.com/pkg/errors).Unwrap
type internalWithCause struct {
	msg   string
	cause error
}

func (e *internalWithCause) Unwrap() error                               { return e.cause } // for go1.13 + errors.Is/As
func (e *internalWithCause) Cause() error                                { return e.cause } // for github.com/pkg/errors
func (e *internalWithCause) Error() string                               { return e.msg + ": " + e.cause.Error() }
func (e *internalWithCause) Code() twirp.ErrorCode                       { return twirp.Internal }
func (e *internalWithCause) Msg() string                                 { return e.msg }
func (e *internalWithCause) Meta(key string) string                      { return "" }
func (e *internalWithCause) MetaMap() map[string]string                  { return nil }
func (e *internalWithCause) WithMeta(key string, val string) twirp.Error { return e }

// malformedRequestError is used when the twirp server cannot unmarshal a request
func malformedRequestError(msg string) twirp.Error {
	return twirp.NewError(twirp.Malformed, msg)
}

// badRouteError is used when the twirp server cannot route a request
func badRouteError(msg string, method, url string) twirp.Error {
	err := twirp.NewError(twirp.BadRoute, msg)
	err = err.WithMeta("twirp_invalid_route", method+" "+url)
	return err
}

// withoutRedirects makes sure that the POST request can not be redirected.
// The standard library will, by default, redirect requests (including POSTs) if it gets a 302 or
// 303 response, and also 301s in go1.8. It redirects by making a second request, changing the
// method to GET and removing the body. This produces very confusing error messages, so instead we
// set a redirect policy that always errors. This stops Go from executing the redirect.
//
// We have to be a little careful in case the user-provided http.Client has its own CheckRedirect
// policy - if so, we'll run through that policy first.
//
// Because this requires modifying the http.Client, we make a new copy of the client and return it.
func withoutRedirects(in *http.Client) *http.Client {
	copy := *in
	copy.CheckRedirect = func(req *http.Request, via []*http.Request) error {
		if in.CheckRedirect != nil {
			// Run the input's redirect if it exists, in case it has side effects, but ignore any error it
			// returns, since we want to use ErrUseLastResponse.
			err := in.CheckRedirect(req, via)
			_ = err // Silly, but this makes sure generated code passes errcheck -blank, which some people use.
		}
		return http.ErrUseLastResponse
	}
	return &copy
}

// doProtobufRequest makes a Protobuf request to the remote Twirp service.
func doProtobufRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) {
	reqBodyBytes, err := proto.Marshal(in)
	if err != nil {
		return ctx, wrapInternal(err, "failed to marshal proto request")
	}
	reqBody := bytes.NewBuffer(reqBodyBytes)
	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}

	req, err := newRequest(ctx, url, reqBody, "application/protobuf")
	if err != nil {
		return ctx, wrapInternal(err, "could not build request")
	}
	ctx, err = callClientRequestPrepared(ctx, hooks, req)
	if err != nil {
		return ctx, err
	}

	req = req.WithContext(ctx)
	resp, err := client.Do(req)
	if err != nil {
		return ctx, wrapInternal(err, "failed to do request")
	}
	defer func() { _ = resp.Body.Close() }()

	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}

	if resp.StatusCode != 200 {
		return ctx, errorFromResponse(resp)
	}

	respBodyBytes, err := io.ReadAll(resp.Body)
	if err != nil {
		return ctx, wrapInternal(err, "failed to read response body")
	}
	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}

	if err = proto.Unmarshal(respBodyBytes, out); err != nil {
		return ctx, wrapInternal(err, "failed to unmarshal proto response")
	}
	return ctx, nil
}

// doJSONRequest makes a JSON request to the remote Twirp service.
func doJSONRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) {
	marshaler := &protojson.MarshalOptions{UseProtoNames: true}
	reqBytes, err := marshaler.Marshal(in)
	if err != nil {
		return ctx, wrapInternal(err, "failed to marshal json request")
	}
	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}

	req, err := newRequest(ctx, url, bytes.NewReader(reqBytes), "application/json")
	if err != nil {
		return ctx, wrapInternal(err, "could not build request")
	}
	ctx, err = callClientRequestPrepared(ctx, hooks, req)
	if err != nil {
		return ctx, err
	}

	req = req.WithContext(ctx)
	resp, err := client.Do(req)
	if err != nil {
		return ctx, wrapInternal(err, "failed to do request")
	}

	defer func() {
		cerr := resp.Body.Close()
		if err == nil && cerr != nil {
			err = wrapInternal(cerr, "failed to close response body")
		}
	}()

	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}

	if resp.StatusCode != 200 {
		return ctx, errorFromResponse(resp)
	}

	d := json.NewDecoder(resp.Body)
	rawRespBody := json.RawMessage{}
	if err := d.Decode(&rawRespBody); err != nil {
		return ctx, wrapInternal(err, "failed to unmarshal json response")
	}
	unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true}
	if err = unmarshaler.Unmarshal(rawRespBody, out); err != nil {
		return ctx, wrapInternal(err, "failed to unmarshal json response")
	}
	if err = ctx.Err(); err != nil {
		return ctx, wrapInternal(err, "aborted because context was done")
	}
	return ctx, nil
}

// Call twirp.ServerHooks.RequestReceived if the hook is available
func callRequestReceived(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) {
	if h == nil || h.RequestReceived == nil {
		return ctx, nil
	}
	return h.RequestReceived(ctx)
}

// Call twirp.ServerHooks.RequestRouted if the hook is available
func callRequestRouted(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) {
	if h == nil || h.RequestRouted == nil {
		return ctx, nil
	}
	return h.RequestRouted(ctx)
}

// Call twirp.ServerHooks.ResponsePrepared if the hook is available
func callResponsePrepared(ctx context.Context, h *twirp.ServerHooks) context.Context {
	if h == nil || h.ResponsePrepared == nil {
		return ctx
	}
	return h.ResponsePrepared(ctx)
}

// Call twirp.ServerHooks.ResponseSent if the hook is available
func callResponseSent(ctx context.Context, h *twirp.ServerHooks) {
	if h == nil || h.ResponseSent == nil {
		return
	}
	h.ResponseSent(ctx)
}

// Call twirp.ServerHooks.Error if the hook is available
func callError(ctx context.Context, h *twirp.ServerHooks, err twirp.Error) context.Context {
	if h == nil || h.Error == nil {
		return ctx
	}
	return h.Error(ctx, err)
}

func callClientResponseReceived(ctx context.Context, h *twirp.ClientHooks) {
	if h == nil || h.ResponseReceived == nil {
		return
	}
	h.ResponseReceived(ctx)
}

func callClientRequestPrepared(ctx context.Context, h *twirp.ClientHooks, req *http.Request) (context.Context, error) {
	if h == nil || h.RequestPrepared == nil {
		return ctx, nil
	}
	return h.RequestPrepared(ctx, req)
}

func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) {
	if h == nil || h.Error == nil {
		return
	}
	h.Error(ctx, err)
}

var twirpFileDescriptor0 = []byte{
	// 7167 bytes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