// Copyright 2020 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

// (Re-)generated by schema tool
// >>>> DO NOT CHANGE THIS FILE! <<<<
// Change the json schema instead

package coregovernance

import "github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"

type ArrayOfImmutableAddress struct {
	proxy wasmtypes.Proxy
}

func (a ArrayOfImmutableAddress) Length() uint32 {
	return a.proxy.Length()
}

func (a ArrayOfImmutableAddress) GetAddress(index uint32) wasmtypes.ScImmutableAddress {
	return wasmtypes.NewScImmutableAddress(a.proxy.Index(index))
}

type ImmutableGetAllowedStateControllerAddressesResults struct {
	proxy wasmtypes.Proxy
}

// native contract, so this is an Array16
func (s ImmutableGetAllowedStateControllerAddressesResults) AllowedStateControllerAddresses() ArrayOfImmutableAddress {
	return ArrayOfImmutableAddress{proxy: s.proxy.Root(ResultAllowedStateControllerAddresses)}
}

type ArrayOfMutableAddress struct {
	proxy wasmtypes.Proxy
}

func (a ArrayOfMutableAddress) AppendAddress() wasmtypes.ScMutableAddress {
	return wasmtypes.NewScMutableAddress(a.proxy.Append())
}

func (a ArrayOfMutableAddress) Clear() {
	a.proxy.ClearArray()
}

func (a ArrayOfMutableAddress) Length() uint32 {
	return a.proxy.Length()
}

func (a ArrayOfMutableAddress) GetAddress(index uint32) wasmtypes.ScMutableAddress {
	return wasmtypes.NewScMutableAddress(a.proxy.Index(index))
}

type MutableGetAllowedStateControllerAddressesResults struct {
	proxy wasmtypes.Proxy
}

// native contract, so this is an Array16
func (s MutableGetAllowedStateControllerAddressesResults) AllowedStateControllerAddresses() ArrayOfMutableAddress {
	return ArrayOfMutableAddress{proxy: s.proxy.Root(ResultAllowedStateControllerAddresses)}
}

type ImmutableGetChainInfoResults struct {
	proxy wasmtypes.Proxy
}

func (s ImmutableGetChainInfoResults) ChainID() wasmtypes.ScImmutableChainID {
	return wasmtypes.NewScImmutableChainID(s.proxy.Root(ResultChainID))
}

func (s ImmutableGetChainInfoResults) ChainOwnerID() wasmtypes.ScImmutableAgentID {
	return wasmtypes.NewScImmutableAgentID(s.proxy.Root(ResultChainOwnerID))
}

func (s ImmutableGetChainInfoResults) Description() wasmtypes.ScImmutableString {
	return wasmtypes.NewScImmutableString(s.proxy.Root(ResultDescription))
}

func (s ImmutableGetChainInfoResults) GasFeePolicyBytes() wasmtypes.ScImmutableBytes {
	return wasmtypes.NewScImmutableBytes(s.proxy.Root(ResultGasFeePolicyBytes))
}

func (s ImmutableGetChainInfoResults) MaxBlobSize() wasmtypes.ScImmutableUint32 {
	return wasmtypes.NewScImmutableUint32(s.proxy.Root(ResultMaxBlobSize))
}

func (s ImmutableGetChainInfoResults) MaxEventSize() wasmtypes.ScImmutableUint16 {
	return wasmtypes.NewScImmutableUint16(s.proxy.Root(ResultMaxEventSize))
}

func (s ImmutableGetChainInfoResults) MaxEventsPerReq() wasmtypes.ScImmutableUint16 {
	return wasmtypes.NewScImmutableUint16(s.proxy.Root(ResultMaxEventsPerReq))
}

type MutableGetChainInfoResults struct {
	proxy wasmtypes.Proxy
}

func (s MutableGetChainInfoResults) ChainID() wasmtypes.ScMutableChainID {
	return wasmtypes.NewScMutableChainID(s.proxy.Root(ResultChainID))
}

func (s MutableGetChainInfoResults) ChainOwnerID() wasmtypes.ScMutableAgentID {
	return wasmtypes.NewScMutableAgentID(s.proxy.Root(ResultChainOwnerID))
}

func (s MutableGetChainInfoResults) Description() wasmtypes.ScMutableString {
	return wasmtypes.NewScMutableString(s.proxy.Root(ResultDescription))
}

func (s MutableGetChainInfoResults) GasFeePolicyBytes() wasmtypes.ScMutableBytes {
	return wasmtypes.NewScMutableBytes(s.proxy.Root(ResultGasFeePolicyBytes))
}

func (s MutableGetChainInfoResults) MaxBlobSize() wasmtypes.ScMutableUint32 {
	return wasmtypes.NewScMutableUint32(s.proxy.Root(ResultMaxBlobSize))
}

func (s MutableGetChainInfoResults) MaxEventSize() wasmtypes.ScMutableUint16 {
	return wasmtypes.NewScMutableUint16(s.proxy.Root(ResultMaxEventSize))
}

func (s MutableGetChainInfoResults) MaxEventsPerReq() wasmtypes.ScMutableUint16 {
	return wasmtypes.NewScMutableUint16(s.proxy.Root(ResultMaxEventsPerReq))
}

type MapBytesToImmutableBytes struct {
	proxy wasmtypes.Proxy
}

func (m MapBytesToImmutableBytes) GetBytes(key []byte) wasmtypes.ScImmutableBytes {
	return wasmtypes.NewScImmutableBytes(m.proxy.Key(wasmtypes.BytesToBytes(key)))
}

type ImmutableGetChainNodesResults struct {
	proxy wasmtypes.Proxy
}

func (s ImmutableGetChainNodesResults) AccessNodeCandidates() MapBytesToImmutableBytes {
	return MapBytesToImmutableBytes{proxy: s.proxy.Root(ResultAccessNodeCandidates)}
}

func (s ImmutableGetChainNodesResults) AccessNodes() MapBytesToImmutableBytes {
	return MapBytesToImmutableBytes{proxy: s.proxy.Root(ResultAccessNodes)}
}

type MapBytesToMutableBytes struct {
	proxy wasmtypes.Proxy
}

func (m MapBytesToMutableBytes) Clear() {
	m.proxy.ClearMap()
}

func (m MapBytesToMutableBytes) GetBytes(key []byte) wasmtypes.ScMutableBytes {
	return wasmtypes.NewScMutableBytes(m.proxy.Key(wasmtypes.BytesToBytes(key)))
}

type MutableGetChainNodesResults struct {
	proxy wasmtypes.Proxy
}

func (s MutableGetChainNodesResults) AccessNodeCandidates() MapBytesToMutableBytes {
	return MapBytesToMutableBytes{proxy: s.proxy.Root(ResultAccessNodeCandidates)}
}

func (s MutableGetChainNodesResults) AccessNodes() MapBytesToMutableBytes {
	return MapBytesToMutableBytes{proxy: s.proxy.Root(ResultAccessNodes)}
}

type ImmutableGetChainOwnerResults struct {
	proxy wasmtypes.Proxy
}

func (s ImmutableGetChainOwnerResults) ChainOwner() wasmtypes.ScImmutableAgentID {
	return wasmtypes.NewScImmutableAgentID(s.proxy.Root(ResultChainOwner))
}

type MutableGetChainOwnerResults struct {
	proxy wasmtypes.Proxy
}

func (s MutableGetChainOwnerResults) ChainOwner() wasmtypes.ScMutableAgentID {
	return wasmtypes.NewScMutableAgentID(s.proxy.Root(ResultChainOwner))
}

type ImmutableGetFeePolicyResults struct {
	proxy wasmtypes.Proxy
}

func (s ImmutableGetFeePolicyResults) FeePolicyBytes() wasmtypes.ScImmutableBytes {
	return wasmtypes.NewScImmutableBytes(s.proxy.Root(ResultFeePolicyBytes))
}

type MutableGetFeePolicyResults struct {
	proxy wasmtypes.Proxy
}

func (s MutableGetFeePolicyResults) FeePolicyBytes() wasmtypes.ScMutableBytes {
	return wasmtypes.NewScMutableBytes(s.proxy.Root(ResultFeePolicyBytes))
}

type ImmutableGetMaxBlobSizeResults struct {
	proxy wasmtypes.Proxy
}

func (s ImmutableGetMaxBlobSizeResults) MaxBlobSize() wasmtypes.ScImmutableUint32 {
	return wasmtypes.NewScImmutableUint32(s.proxy.Root(ResultMaxBlobSize))
}

type MutableGetMaxBlobSizeResults struct {
	proxy wasmtypes.Proxy
}

func (s MutableGetMaxBlobSizeResults) MaxBlobSize() wasmtypes.ScMutableUint32 {
	return wasmtypes.NewScMutableUint32(s.proxy.Root(ResultMaxBlobSize))
}
