/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { combineCodec, getArrayDecoder, getArrayEncoder, getOptionDecoder, getOptionEncoder, getStructDecoder, getStructEncoder, type Codec, type Decoder, type Encoder, type Option, type OptionOrNullable, } from '@solana/kit'; import { getFactionDecoder, getFactionEncoder, type Faction, type FactionArgs, } from '@staratlas/dev-profile-faction'; import { getBuildingTagDecoder, getBuildingTagEncoder, getLocationTagDecoder, getLocationTagEncoder, getStarbaseLevelDecoder, getStarbaseLevelEncoder, getStarbaseMaxLevelSetDecoder, getStarbaseMaxLevelSetEncoder, type BuildingTag, type BuildingTagArgs, type LocationTag, type LocationTagArgs, type StarbaseLevel, type StarbaseLevelArgs, type StarbaseMaxLevelSet, type StarbaseMaxLevelSetArgs, } from '.'; export type UpdateStarbaseArgs = { /** The index representing the level of the `Starbase` in the game variables. */ starbaseLevel: Option; localMarketEnableLevel: Option; repairEnableLevel: Option; starbaseMaxLevel: Option; locationTags: Option>; buildingTags: Option>; /** The `Starbase` faction */ faction: Option; }; export type UpdateStarbaseArgsArgs = { /** The index representing the level of the `Starbase` in the game variables. */ starbaseLevel: OptionOrNullable; localMarketEnableLevel: OptionOrNullable; repairEnableLevel: OptionOrNullable; starbaseMaxLevel: OptionOrNullable; locationTags: OptionOrNullable>; buildingTags: OptionOrNullable>; /** The `Starbase` faction */ faction: OptionOrNullable; }; export function getUpdateStarbaseArgsEncoder(): Encoder { return getStructEncoder([ ['starbaseLevel', getOptionEncoder(getStarbaseLevelEncoder())], ['localMarketEnableLevel', getOptionEncoder(getStarbaseLevelEncoder())], ['repairEnableLevel', getOptionEncoder(getStarbaseLevelEncoder())], ['starbaseMaxLevel', getOptionEncoder(getStarbaseMaxLevelSetEncoder())], [ 'locationTags', getOptionEncoder(getArrayEncoder(getLocationTagEncoder())), ], [ 'buildingTags', getOptionEncoder(getArrayEncoder(getBuildingTagEncoder())), ], ['faction', getOptionEncoder(getFactionEncoder())], ]); } export function getUpdateStarbaseArgsDecoder(): Decoder { return getStructDecoder([ ['starbaseLevel', getOptionDecoder(getStarbaseLevelDecoder())], ['localMarketEnableLevel', getOptionDecoder(getStarbaseLevelDecoder())], ['repairEnableLevel', getOptionDecoder(getStarbaseLevelDecoder())], ['starbaseMaxLevel', getOptionDecoder(getStarbaseMaxLevelSetDecoder())], [ 'locationTags', getOptionDecoder(getArrayDecoder(getLocationTagDecoder())), ], [ 'buildingTags', getOptionDecoder(getArrayDecoder(getBuildingTagDecoder())), ], ['faction', getOptionDecoder(getFactionDecoder())], ]); } export function getUpdateStarbaseArgsCodec(): Codec< UpdateStarbaseArgsArgs, UpdateStarbaseArgs > { return combineCodec( getUpdateStarbaseArgsEncoder(), getUpdateStarbaseArgsDecoder(), ); }