// Code generated by protoc-gen-typescript-http. DO NOT EDIT.
/* eslint-disable camelcase */
// @ts-nocheck

export type PingReq = {
};

export type PingRsp = {
};

export type EchoReq = {
  text: string | undefined;
};

export type EchoRsp = {
  text: string | undefined;
};

export type SignupReq = {
  username: string | undefined;
  email: string | undefined;
};

export type SignupRsp = {
  error: string | undefined;
};

export type RefreshPasswordReq = {
  email: string | undefined;
};

export type RefreshPasswordRsp = {
  error: string | undefined;
};

export type LoginReq = {
  email: string | undefined;
  password: string | undefined;
};

export type LoginRsp = {
  error: string | undefined;
  accessToken: string | undefined;
  refreshToken: string | undefined;
};

export type RefreshReq = {
  refreshToken: string | undefined;
};

export type RefreshRsp = {
  error: string | undefined;
  accessToken: string | undefined;
  refreshToken: string | undefined;
};

export type GetUsersReq = {
};

export type GetUsersRsp = {
  error: string | undefined;
  users: User[] | undefined;
};

export type User = {
  id: number | undefined;
  username: string | undefined;
  email: string | undefined;
  roles: string[] | undefined;
  isActive: boolean | undefined;
  createdAt: wellKnownTimestamp | undefined;
};

// Encoded using RFC 3339, where generated output will always be Z-normalized
// and uses 0, 3, 6 or 9 fractional digits.
// Offsets other than "Z" are also accepted.
type wellKnownTimestamp = string;

export type GetUserByIdReq = {
  id: number | undefined;
};

export type GetUserByIdRsp = {
  error: string | undefined;
  user: User | undefined;
};

export type GetMeReq = {
};

export type GetMeRsp = {
  error: string | undefined;
  user: User | undefined;
};

export type AddUserRoleReq = {
  id: number | undefined;
  role: string | undefined;
};

export type AddUserRoleRsp = {
  error: string | undefined;
};

export type DeleteUserRoleReq = {
  id: number | undefined;
  role: string | undefined;
};

export type DeleteUserRoleRsp = {
  error: string | undefined;
};

export type GetPermissionsReq = {
};

export type GetPermissionsRsp = {
  error: string | undefined;
  permissions: string[] | undefined;
};

export type UploadFileReq = {
  filename: string | undefined;
  data: string | undefined;
};

export type UploadFileRsp = {
  error: string | undefined;
  filename: string | undefined;
};

export type DownloadFileReq = {
  filename: string | undefined;
};

export type AddScenarioReq = {
  name: string | undefined;
};

export type AddScenarioRsp = {
  error: string | undefined;
  id: number | undefined;
};

export type GetMyScenariosReq = {
};

export type GetMyScenariosRsp = {
  error: string | undefined;
  scenarios: Scenario[] | undefined;
};

export type Scenario = {
  id: number | undefined;
  name: string | undefined;
  description?: string;
  image?: string;
  story: Story | undefined;
  status: string | undefined;
  author: User | undefined;
  updatedAt: wellKnownTimestamp | undefined;
  createdAt: wellKnownTimestamp | undefined;
  publishedAt: wellKnownTimestamp | undefined;
};

export type Story = {
  places: Place[] | undefined;
};

export type Place = {
  code: string | undefined;
  name: string | undefined;
  text: string | undefined;
  image: string | undefined;
  hidden: boolean | undefined;
  applications: Application[] | undefined;
  doors: Door[] | undefined;
  keys: Key[] | undefined;
};

export type Application = {
  name: string | undefined;
  image: string | undefined;
};

export type Door = {
  code: string | undefined;
  name: string | undefined;
  keys: Key[] | undefined;
};

export type Key = {
  name: string | undefined;
};

export type GetScenariosCatalogReq = {
};

export type GetScenariosCatalogRsp = {
  error: string | undefined;
  scenarios: Scenario[] | undefined;
};

export type GetScenarioReq = {
  id: number | undefined;
};

export type GetScenarioRsp = {
  error: string | undefined;
  scenario: Scenario | undefined;
};

export type UpdateScenarioReq = {
  id: number | undefined;
  name: string | undefined;
  description: string | undefined;
  image: string | undefined;
};

export type UpdateScenarioRsp = {
  error: string | undefined;
};

export type PublicScenarioReq = {
  id: number | undefined;
};

export type PublicScenarioRsp = {
  error: string | undefined;
};

export type DraftScenarioReq = {
  id: number | undefined;
};

export type DraftScenarioRsp = {
  error: string | undefined;
};

export type DeleteScenarioReq = {
  id: number | undefined;
};

export type DeleteScenarioRsp = {
  error: string | undefined;
};

export type AddScenarioPlaceReq = {
  id: number | undefined;
  place: Place | undefined;
};

export type AddScenarioPlaceRsp = {
  error: string | undefined;
};

export type UpdateScenarioPlaceReq = {
  id: number | undefined;
  code: string | undefined;
  place: Place | undefined;
};

export type UpdateScenarioPlaceRsp = {
  error: string | undefined;
};

export type DeleteScenarioPlaceReq = {
  id: number | undefined;
  code: string | undefined;
};

export type DeleteScenarioPlaceRsp = {
  error: string | undefined;
};

export type AddGameReq = {
  name: string | undefined;
  description: string | undefined;
  startAt: wellKnownTimestamp | undefined;
  scenarioId: number | undefined;
};

export type AddGameRsp = {
  error: string | undefined;
  id: number | undefined;
};

export type GetGamesReq = {
};

export type GetGamesRsp = {
  error: string | undefined;
  games: Game[] | undefined;
};

export type Game = {
  id: number | undefined;
  name: string | undefined;
  description: string | undefined;
  startAt: wellKnownTimestamp | undefined;
  status: string | undefined;
  scenario: Scenario | undefined;
  teams: Team[] | undefined;
};

export type Team = {
  id: number | undefined;
  name: string | undefined;
  status: string | undefined;
  password: string | undefined;
  actionsCount: number | undefined;
  applications: Application[] | undefined;
};

export type GetGameReq = {
  id: number | undefined;
};

export type GetGameRsp = {
  error: string | undefined;
  game: Game | undefined;
};

export type UpdateGameReq = {
  id: number | undefined;
  name: string | undefined;
  description: string | undefined;
  startAt: wellKnownTimestamp | undefined;
  scenarioId: number | undefined;
};

export type UpdateGameRsp = {
  error: string | undefined;
};

export type DeleteGameReq = {
  id: number | undefined;
};

export type DeleteGameRsp = {
  error: string | undefined;
};

export type AddTeamReq = {
  gameId: number | undefined;
  name: string | undefined;
};

export type AddTeamRsp = {
  error: string | undefined;
  id: number | undefined;
  password: string | undefined;
};

export type UpdateTeamReq = {
  id: number | undefined;
  name: string | undefined;
};

export type UpdateTeamRsp = {
  error: string | undefined;
};

export type DeleteTeamReq = {
  id: number | undefined;
};

export type DeleteTeamRsp = {
  error: string | undefined;
};

export type GiveTeamApplicationsReq = {
  id: number | undefined;
  name: string | undefined;
};

export type GiveTeamApplicationsRsp = {
  error: string | undefined;
};

export type GetTeamStoryReq = {
  id: number | undefined;
  password: string | undefined;
};

export type GetTeamStoryRsp = {
  error: string | undefined;
  story: Story | undefined;
};

export type AddTeamActionReq = {
  id: number | undefined;
  password: string | undefined;
  code: string | undefined;
};

export type AddTeamActionRsp = {
  error: string | undefined;
};

export type DeleteLastTeamActionReq = {
  id: number | undefined;
};

export type DeleteLastTeamActionRsp = {
  error: string | undefined;
};

export interface EveningDetectiveServer {
  Ping(request: PingReq): Promise<PingRsp>;
  Echo(request: EchoReq): Promise<EchoRsp>;
  Signup(request: SignupReq): Promise<SignupRsp>;
  RefreshPassword(request: RefreshPasswordReq): Promise<RefreshPasswordRsp>;
  Login(request: LoginReq): Promise<LoginRsp>;
  Refresh(request: RefreshReq): Promise<RefreshRsp>;
  GetUsers(request: GetUsersReq): Promise<GetUsersRsp>;
  GetUserById(request: GetUserByIdReq): Promise<GetUserByIdRsp>;
  GetMe(request: GetMeReq): Promise<GetMeRsp>;
  AddUserRole(request: AddUserRoleReq): Promise<AddUserRoleRsp>;
  DeleteUserRole(request: DeleteUserRoleReq): Promise<DeleteUserRoleRsp>;
  GetPermissions(request: GetPermissionsReq): Promise<GetPermissionsRsp>;
  UploadFile(request: UploadFileReq): Promise<UploadFileRsp>;
  DownloadFile(request: DownloadFileReq): Promise<googleapi_HttpBody>;
  AddScenario(request: AddScenarioReq): Promise<AddScenarioRsp>;
  GetMyScenarios(request: GetMyScenariosReq): Promise<GetMyScenariosRsp>;
  GetScenariosCatalog(request: GetScenariosCatalogReq): Promise<GetScenariosCatalogRsp>;
  GetFullScenario(request: GetScenarioReq): Promise<GetScenarioRsp>;
  GetScenario(request: GetScenarioReq): Promise<GetScenarioRsp>;
  UpdateScenario(request: UpdateScenarioReq): Promise<UpdateScenarioRsp>;
  PublicScenario(request: PublicScenarioReq): Promise<PublicScenarioRsp>;
  DraftScenario(request: DraftScenarioReq): Promise<DraftScenarioRsp>;
  DeleteScenario(request: DeleteScenarioReq): Promise<DeleteScenarioRsp>;
  AddScenarioPlace(request: AddScenarioPlaceReq): Promise<AddScenarioPlaceRsp>;
  UpdateScenarioPlace(request: UpdateScenarioPlaceReq): Promise<UpdateScenarioPlaceRsp>;
  DeleteScenarioPlace(request: DeleteScenarioPlaceReq): Promise<DeleteScenarioPlaceRsp>;
  AddGame(request: AddGameReq): Promise<AddGameRsp>;
  GetGames(request: GetGamesReq): Promise<GetGamesRsp>;
  GetGame(request: GetGameReq): Promise<GetGameRsp>;
  UpdateGame(request: UpdateGameReq): Promise<UpdateGameRsp>;
  DeleteGame(request: DeleteGameReq): Promise<DeleteGameRsp>;
  AddTeam(request: AddTeamReq): Promise<AddTeamRsp>;
  UpdateTeam(request: UpdateTeamReq): Promise<UpdateTeamRsp>;
  DeleteTeam(request: DeleteTeamReq): Promise<DeleteTeamRsp>;
  GiveTeamApplications(request: GiveTeamApplicationsReq): Promise<GiveTeamApplicationsRsp>;
  GetTeamStory(request: GetTeamStoryReq): Promise<GetTeamStoryRsp>;
  AddTeamAction(request: AddTeamActionReq): Promise<AddTeamActionRsp>;
  DeleteLastTeamAction(request: DeleteLastTeamActionReq): Promise<DeleteLastTeamActionRsp>;
}

type RequestType = {
  path: string;
  method: string;
  body: string | null;
};

type RequestHandler = (request: RequestType, meta: { service: string, method: string }) => Promise<unknown>;

export function createEveningDetectiveServerClient(
  handler: RequestHandler
): EveningDetectiveServer {
  return {
    Ping(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/test/ping`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "Ping",
      }) as Promise<PingRsp>;
    },
    Echo(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/test/echo`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      if (request.text) {
        queryParams.push(`text=${encodeURIComponent(request.text.toString())}`)
      }
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "Echo",
      }) as Promise<EchoRsp>;
    },
    Signup(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/auth/signup`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "Signup",
      }) as Promise<SignupRsp>;
    },
    RefreshPassword(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/auth/refresh-password`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "RefreshPassword",
      }) as Promise<RefreshPasswordRsp>;
    },
    Login(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/auth/login`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "Login",
      }) as Promise<LoginRsp>;
    },
    Refresh(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/auth/refresh`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "Refresh",
      }) as Promise<RefreshRsp>;
    },
    GetUsers(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/users`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetUsers",
      }) as Promise<GetUsersRsp>;
    },
    GetUserById(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/users/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetUserById",
      }) as Promise<GetUserByIdRsp>;
    },
    GetMe(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/users/me`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetMe",
      }) as Promise<GetMeRsp>;
    },
    AddUserRole(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/users/${request.id}/role/add`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddUserRole",
      }) as Promise<AddUserRoleRsp>;
    },
    DeleteUserRole(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/users/${request.id}/role/delete`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteUserRole",
      }) as Promise<DeleteUserRoleRsp>;
    },
    GetPermissions(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/ui/permissions`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetPermissions",
      }) as Promise<GetPermissionsRsp>;
    },
    UploadFile(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/files/upload`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "UploadFile",
      }) as Promise<UploadFileRsp>;
    },
    DownloadFile(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.filename) {
        throw new Error("missing required field request.filename");
      }
      const path = `api/files/${request.filename}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DownloadFile",
      }) as Promise<googleapi_HttpBody>;
    },
    AddScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/scenario`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddScenario",
      }) as Promise<AddScenarioRsp>;
    },
    GetMyScenarios(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/my-scenarios`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetMyScenarios",
      }) as Promise<GetMyScenariosRsp>;
    },
    GetScenariosCatalog(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/catalog`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetScenariosCatalog",
      }) as Promise<GetScenariosCatalogRsp>;
    },
    GetFullScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}/full`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetFullScenario",
      }) as Promise<GetScenarioRsp>;
    },
    GetScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetScenario",
      }) as Promise<GetScenarioRsp>;
    },
    UpdateScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "UpdateScenario",
      }) as Promise<UpdateScenarioRsp>;
    },
    PublicScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}/public`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "PublicScenario",
      }) as Promise<PublicScenarioRsp>;
    },
    DraftScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}/draft`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DraftScenario",
      }) as Promise<DraftScenarioRsp>;
    },
    DeleteScenario(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "DELETE",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteScenario",
      }) as Promise<DeleteScenarioRsp>;
    },
    AddScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/scenarios/${request.id}/places`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddScenarioPlace",
      }) as Promise<AddScenarioPlaceRsp>;
    },
    UpdateScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      if (!request.code) {
        throw new Error("missing required field request.code");
      }
      const path = `api/scenarios/${request.id}/places/${request.code}`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "UpdateScenarioPlace",
      }) as Promise<UpdateScenarioPlaceRsp>;
    },
    DeleteScenarioPlace(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      if (!request.code) {
        throw new Error("missing required field request.code");
      }
      const path = `api/scenarios/${request.id}/places/${request.code}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "DELETE",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteScenarioPlace",
      }) as Promise<DeleteScenarioPlaceRsp>;
    },
    AddGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/games`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddGame",
      }) as Promise<AddGameRsp>;
    },
    GetGames(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/games`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetGames",
      }) as Promise<GetGamesRsp>;
    },
    GetGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/games/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetGame",
      }) as Promise<GetGameRsp>;
    },
    UpdateGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/games/${request.id}`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "UpdateGame",
      }) as Promise<UpdateGameRsp>;
    },
    DeleteGame(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/games/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "DELETE",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteGame",
      }) as Promise<DeleteGameRsp>;
    },
    AddTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      const path = `api/teams`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddTeam",
      }) as Promise<AddTeamRsp>;
    },
    UpdateTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "PUT",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "UpdateTeam",
      }) as Promise<UpdateTeamRsp>;
    },
    DeleteTeam(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "DELETE",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteTeam",
      }) as Promise<DeleteTeamRsp>;
    },
    GiveTeamApplications(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}/applications`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GiveTeamApplications",
      }) as Promise<GiveTeamApplicationsRsp>;
    },
    GetTeamStory(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}/story`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      if (request.password) {
        queryParams.push(`password=${encodeURIComponent(request.password.toString())}`)
      }
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "GET",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "GetTeamStory",
      }) as Promise<GetTeamStoryRsp>;
    },
    AddTeamAction(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}/actions`; // eslint-disable-line quotes
      const body = JSON.stringify(request);
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "POST",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "AddTeamAction",
      }) as Promise<AddTeamActionRsp>;
    },
    DeleteLastTeamAction(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
      if (!request.id) {
        throw new Error("missing required field request.id");
      }
      const path = `api/teams/${request.id}/last-actions`; // eslint-disable-line quotes
      const body = null;
      const queryParams: string[] = [];
      let uri = path;
      if (queryParams.length > 0) {
        uri += `?${queryParams.join("&")}`
      }
      return handler({
        path: uri,
        method: "DELETE",
        body,
      }, {
        service: "EveningDetectiveServer",
        method: "DeleteLastTeamAction",
      }) as Promise<DeleteLastTeamActionRsp>;
    },
  };
}
// Message that represents an arbitrary HTTP body. It should only be used for
// payload formats that can't be represented as JSON, such as raw binary or
// an HTML page.
// This message can be used both in streaming and non-streaming API methods in
// the request as well as the response.
// It can be used as a top-level request field, which is convenient if one
// wants to extract parameters from either the URL or HTTP template into the
// request fields and also want access to the raw HTTP body.
// Example:
// message GetResourceRequest {
// // A unique request id.
// string request_id = 1;
// // The raw HTTP body is bound to this field.
// google.api.HttpBody http_body = 2;
// }
// service ResourceService {
// rpc GetResource(GetResourceRequest)
// returns (google.api.HttpBody);
// rpc UpdateResource(google.api.HttpBody)
// returns (google.protobuf.Empty);
// }
// Example with streaming methods:
// service CaldavService {
// rpc GetCalendar(stream google.api.HttpBody)
// returns (stream google.api.HttpBody);
// rpc UpdateCalendar(stream google.api.HttpBody)
// returns (stream google.api.HttpBody);
// }
// Use of this type only changes how the request and response bodies are
// handled, all other features will continue to work unchanged.
export type googleapi_HttpBody = {
  // The HTTP Content-Type header value specifying the content type of the body.
  contentType: string | undefined;
  // The HTTP request/response body as raw binary.
  data: string | undefined;
  // Application specific response metadata. Must be set in the first response
  // for streaming APIs.
  extensions: wellKnownAny[] | undefined;
};

// If the Any contains a value that has a special JSON mapping,
// it will be converted as follows:
// {"@type": xxx, "value": yyy}.
// Otherwise, the value will be converted into a JSON object,
// and the "@type" field will be inserted to indicate the actual data type.
interface wellKnownAny {
  "@type": string;
  [key: string]: unknown;
}


// @@protoc_insertion_point(typescript-http-eof)
