// @ts-nocheck
/**
 * This file was automatically generated by @cosmwasm/ts-codegen@0.24.0.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run the @cosmwasm/ts-codegen generate command to regenerate this file.
 */

import { Coin } from '@cosmjs/amino'
import { MsgExecuteContractEncodeObject } from 'cosmwasm'
import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx'
import { toUtf8 } from '@cosmjs/encoding'

import {
  ConfigResponse,
  Decimal,
  ExecuteMsg,
  HealthResponse,
  InstantiateMsg,
  OwnerResponse,
  OwnerUpdate,
  QueryMsg,
  Uint128,
} from './MarsRoverHealthTypes.types'
export interface MarsRoverHealthTypesMessage {
  contractAddress: string
  sender: string
  updateOwner: (funds?: Coin[]) => MsgExecuteContractEncodeObject
  updateConfig: (
    {
      creditManager,
    }: {
      creditManager: string
    },
    funds?: Coin[],
  ) => MsgExecuteContractEncodeObject
}
export class MarsRoverHealthTypesMessageComposer implements MarsRoverHealthTypesMessage {
  sender: string
  contractAddress: string

  constructor(sender: string, contractAddress: string) {
    this.sender = sender
    this.contractAddress = contractAddress
    this.updateOwner = this.updateOwner.bind(this)
    this.updateConfig = this.updateConfig.bind(this)
  }

  updateOwner = (funds?: Coin[]): MsgExecuteContractEncodeObject => {
    return {
      typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
      value: MsgExecuteContract.fromPartial({
        sender: this.sender,
        contract: this.contractAddress,
        msg: toUtf8(
          JSON.stringify({
            update_owner: {},
          }),
        ),
        funds,
      }),
    }
  }
  updateConfig = (
    {
      creditManager,
    }: {
      creditManager: string
    },
    funds?: Coin[],
  ): MsgExecuteContractEncodeObject => {
    return {
      typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
      value: MsgExecuteContract.fromPartial({
        sender: this.sender,
        contract: this.contractAddress,
        msg: toUtf8(
          JSON.stringify({
            update_config: {
              credit_manager: creditManager,
            },
          }),
        ),
        funds,
      }),
    }
  }
}
