Skip to content

Commit

Permalink
feat: add CopyRef() and Deref() methods to all types
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow committed Nov 18, 2024
1 parent 1b3c0e3 commit fe65565
Show file tree
Hide file tree
Showing 300 changed files with 4,200 additions and 0 deletions.
14 changes: 14 additions & 0 deletions aa-user/types/application_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ func (ai ApplicationInfo) Equals(o types.RVType) bool {
return ai.TitleVersion.Equals(other.TitleVersion)
}

// CopyRef copies the current value of the ApplicationInfo
// and returns a pointer to the new copy
func (ai ApplicationInfo) CopyRef() types.RVTypePtr {
copied := ai.Copy().(ApplicationInfo)
return &copied
}

// Deref takes a pointer to the ApplicationInfo
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (ai *ApplicationInfo) Deref() types.RVType {
return *ai
}

// String returns the string representation of the ApplicationInfo
func (ai ApplicationInfo) String() string {
return ai.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions account-management/types/account_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,20 @@ func (ad AccountData) Equals(o types.RVType) bool {
return ad.StrExpiredMsg.Equals(other.StrExpiredMsg)
}

// CopyRef copies the current value of the AccountData
// and returns a pointer to the new copy
func (ad AccountData) CopyRef() types.RVTypePtr {
copied := ad.Copy().(AccountData)
return &copied
}

// Deref takes a pointer to the AccountData
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (ad *AccountData) Deref() types.RVType {
return *ad
}

// String returns the string representation of the AccountData
func (ad AccountData) String() string {
return ad.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions account-management/types/account_extra_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ func (aei AccountExtraInfo) Equals(o types.RVType) bool {
return aei.NEXToken.Equals(other.NEXToken)
}

// CopyRef copies the current value of the AccountExtraInfo
// and returns a pointer to the new copy
func (aei AccountExtraInfo) CopyRef() types.RVTypePtr {
copied := aei.Copy().(AccountExtraInfo)
return &copied
}

// Deref takes a pointer to the AccountExtraInfo
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (aei *AccountExtraInfo) Deref() types.RVType {
return *aei
}

// String returns the string representation of the AccountExtraInfo
func (aei AccountExtraInfo) String() string {
return aei.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions account-management/types/basic_account_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (bai BasicAccountInfo) Equals(o types.RVType) bool {
return bai.StrName.Equals(other.StrName)
}

// CopyRef copies the current value of the BasicAccountInfo
// and returns a pointer to the new copy
func (bai BasicAccountInfo) CopyRef() types.RVTypePtr {
copied := bai.Copy().(BasicAccountInfo)
return &copied
}

// Deref takes a pointer to the BasicAccountInfo
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (bai *BasicAccountInfo) Deref() types.RVType {
return *bai
}

// String returns the string representation of the BasicAccountInfo
func (bai BasicAccountInfo) String() string {
return bai.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions account-management/types/nintendo_create_account_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ func (ncad NintendoCreateAccountData) Equals(o types.RVType) bool {
return ncad.Unknown.Equals(other.Unknown)
}

// CopyRef copies the current value of the NintendoCreateAccountData
// and returns a pointer to the new copy
func (ncad NintendoCreateAccountData) CopyRef() types.RVTypePtr {
copied := ncad.Copy().(NintendoCreateAccountData)
return &copied
}

// Deref takes a pointer to the NintendoCreateAccountData
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (ncad *NintendoCreateAccountData) Deref() types.RVType {
return *ncad
}

// String returns the string representation of the NintendoCreateAccountData
func (ncad NintendoCreateAccountData) String() string {
return ncad.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/miitopia/types/mii_tube_mii_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ func (mtmi MiiTubeMiiInfo) Equals(o types.RVType) bool {
return mtmi.RankingType.Equals(other.RankingType)
}

// CopyRef copies the current value of the MiiTubeMiiInfo
// and returns a pointer to the new copy
func (mtmi MiiTubeMiiInfo) CopyRef() types.RVTypePtr {
copied := mtmi.Copy().(MiiTubeMiiInfo)
return &copied
}

// Deref takes a pointer to the MiiTubeMiiInfo
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (mtmi *MiiTubeMiiInfo) Deref() types.RVType {
return *mtmi
}

// String returns the string representation of the MiiTubeMiiInfo
func (mtmi MiiTubeMiiInfo) String() string {
return mtmi.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/miitopia/types/mii_tube_search_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ func (mtsp MiiTubeSearchParam) Equals(o types.RVType) bool {
return mtsp.ResultOption.Equals(other.ResultOption)
}

// CopyRef copies the current value of the MiiTubeSearchParam
// and returns a pointer to the new copy
func (mtsp MiiTubeSearchParam) CopyRef() types.RVTypePtr {
copied := mtsp.Copy().(MiiTubeSearchParam)
return &copied
}

// Deref takes a pointer to the MiiTubeSearchParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (mtsp *MiiTubeSearchParam) Deref() types.RVType {
return *mtsp
}

// String returns the string representation of the MiiTubeSearchParam
func (mtsp MiiTubeSearchParam) String() string {
return mtsp.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/miitopia/types/mii_tube_search_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ func (mtsr MiiTubeSearchResult) Equals(o types.RVType) bool {
return mtsr.HasNext.Equals(other.HasNext)
}

// CopyRef copies the current value of the MiiTubeSearchResult
// and returns a pointer to the new copy
func (mtsr MiiTubeSearchResult) CopyRef() types.RVTypePtr {
copied := mtsr.Copy().(MiiTubeSearchResult)
return &copied
}

// Deref takes a pointer to the MiiTubeSearchResult
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (mtsr *MiiTubeSearchResult) Deref() types.RVType {
return *mtsr
}

// String returns the string representation of the MiiTubeSearchResult
func (mtsr MiiTubeSearchResult) String() string {
return mtsr.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ func (dsgmboidp DataStoreGetMetaByOwnerIDParam) Equals(o types.RVType) bool {
return dsgmboidp.ResultRange.Equals(other.ResultRange)
}

// CopyRef copies the current value of the DataStoreGetMetaByOwnerIDParam
// and returns a pointer to the new copy
func (dsgmboidp DataStoreGetMetaByOwnerIDParam) CopyRef() types.RVTypePtr {
copied := dsgmboidp.Copy().(DataStoreGetMetaByOwnerIDParam)
return &copied
}

// Deref takes a pointer to the DataStoreGetMetaByOwnerIDParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (dsgmboidp *DataStoreGetMetaByOwnerIDParam) Deref() types.RVType {
return *dsgmboidp
}

// String returns the string representation of the DataStoreGetMetaByOwnerIDParam
func (dsgmboidp DataStoreGetMetaByOwnerIDParam) String() string {
return dsgmboidp.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/pokemon-bank/types/bank_migration_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (bmi BankMigrationInfo) Equals(o types.RVType) bool {
return bmi.UpdatedTime.Equals(other.UpdatedTime)
}

// CopyRef copies the current value of the BankMigrationInfo
// and returns a pointer to the new copy
func (bmi BankMigrationInfo) CopyRef() types.RVTypePtr {
copied := bmi.Copy().(BankMigrationInfo)
return &copied
}

// Deref takes a pointer to the BankMigrationInfo
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (bmi *BankMigrationInfo) Deref() types.RVType {
return *bmi
}

// String returns the string representation of the BankMigrationInfo
func (bmi BankMigrationInfo) String() string {
return bmi.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/pokemon-bank/types/bank_transaction_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ func (btp BankTransactionParam) Equals(o types.RVType) bool {
return btp.TransactionPassword.Equals(other.TransactionPassword)
}

// CopyRef copies the current value of the BankTransactionParam
// and returns a pointer to the new copy
func (btp BankTransactionParam) CopyRef() types.RVTypePtr {
copied := btp.Copy().(BankTransactionParam)
return &copied
}

// Deref takes a pointer to the BankTransactionParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (btp *BankTransactionParam) Deref() types.RVType {
return *btp
}

// String returns the string representation of the BankTransactionParam
func (btp BankTransactionParam) String() string {
return btp.FormatToString(0)
Expand Down
14 changes: 14 additions & 0 deletions datastore/pokemon-bank/types/global_trade_station_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ func (gtsd GlobalTradeStationData) Equals(o types.RVType) bool {
return gtsd.Version.Equals(other.Version)
}

// CopyRef copies the current value of the GlobalTradeStationData
// and returns a pointer to the new copy
func (gtsd GlobalTradeStationData) CopyRef() types.RVTypePtr {
copied := gtsd.Copy().(GlobalTradeStationData)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationData
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsd *GlobalTradeStationData) Deref() types.RVType {
return *gtsd
}

// String returns the string representation of the GlobalTradeStationData
func (gtsd GlobalTradeStationData) String() string {
return gtsd.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (gtsdpp GlobalTradeStationDeletePokemonParam) Equals(o types.RVType) bool {
return gtsdpp.DeleteFlag.Equals(other.DeleteFlag)
}

// CopyRef copies the current value of the GlobalTradeStationDeletePokemonParam
// and returns a pointer to the new copy
func (gtsdpp GlobalTradeStationDeletePokemonParam) CopyRef() types.RVTypePtr {
copied := gtsdpp.Copy().(GlobalTradeStationDeletePokemonParam)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationDeletePokemonParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsdpp *GlobalTradeStationDeletePokemonParam) Deref() types.RVType {
return *gtsdpp
}

// String returns the string representation of the GlobalTradeStationDeletePokemonParam
func (gtsdpp GlobalTradeStationDeletePokemonParam) String() string {
return gtsdpp.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ func (gtsdmpp GlobalTradeStationDownloadMyPokemonParam) Equals(o types.RVType) b
return gtsdmpp.PrepareUploadKey.Equals(other.PrepareUploadKey)
}

// CopyRef copies the current value of the GlobalTradeStationDownloadMyPokemonParam
// and returns a pointer to the new copy
func (gtsdmpp GlobalTradeStationDownloadMyPokemonParam) CopyRef() types.RVTypePtr {
copied := gtsdmpp.Copy().(GlobalTradeStationDownloadMyPokemonParam)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationDownloadMyPokemonParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsdmpp *GlobalTradeStationDownloadMyPokemonParam) Deref() types.RVType {
return *gtsdmpp
}

// String returns the string representation of the GlobalTradeStationDownloadMyPokemonParam
func (gtsdmpp GlobalTradeStationDownloadMyPokemonParam) String() string {
return gtsdmpp.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (gtsdmpr GlobalTradeStationDownloadMyPokemonResult) Equals(o types.RVType)
return gtsdmpr.IsTraded.Equals(other.IsTraded)
}

// CopyRef copies the current value of the GlobalTradeStationDownloadMyPokemonResult
// and returns a pointer to the new copy
func (gtsdmpr GlobalTradeStationDownloadMyPokemonResult) CopyRef() types.RVTypePtr {
copied := gtsdmpr.Copy().(GlobalTradeStationDownloadMyPokemonResult)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationDownloadMyPokemonResult
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsdmpr *GlobalTradeStationDownloadMyPokemonResult) Deref() types.RVType {
return *gtsdmpr
}

// String returns the string representation of the GlobalTradeStationDownloadMyPokemonResult
func (gtsdmpr GlobalTradeStationDownloadMyPokemonResult) String() string {
return gtsdmpr.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ func (gtsdopp GlobalTradeStationDownloadOtherPokemonParam) Equals(o types.RVType
return gtsdopp.PrepareUploadKey.Equals(other.PrepareUploadKey)
}

// CopyRef copies the current value of the GlobalTradeStationDownloadOtherPokemonParam
// and returns a pointer to the new copy
func (gtsdopp GlobalTradeStationDownloadOtherPokemonParam) CopyRef() types.RVTypePtr {
copied := gtsdopp.Copy().(GlobalTradeStationDownloadOtherPokemonParam)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationDownloadOtherPokemonParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsdopp *GlobalTradeStationDownloadOtherPokemonParam) Deref() types.RVType {
return *gtsdopp
}

// String returns the string representation of the GlobalTradeStationDownloadOtherPokemonParam
func (gtsdopp GlobalTradeStationDownloadOtherPokemonParam) String() string {
return gtsdopp.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ func (gtsdpr GlobalTradeStationDownloadPokemonResult) Equals(o types.RVType) boo
return gtsdpr.PokemonData.Equals(other.PokemonData)
}

// CopyRef copies the current value of the GlobalTradeStationDownloadPokemonResult
// and returns a pointer to the new copy
func (gtsdpr GlobalTradeStationDownloadPokemonResult) CopyRef() types.RVTypePtr {
copied := gtsdpr.Copy().(GlobalTradeStationDownloadPokemonResult)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationDownloadPokemonResult
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsdpr *GlobalTradeStationDownloadPokemonResult) Deref() types.RVType {
return *gtsdpr
}

// String returns the string representation of the GlobalTradeStationDownloadPokemonResult
func (gtsdpr GlobalTradeStationDownloadPokemonResult) String() string {
return gtsdpr.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (gtsptpp GlobalTradeStationPrepareTradePokemonParam) Equals(o types.RVType)
return gtsptpp.PrepareUploadKey.Equals(other.PrepareUploadKey)
}

// CopyRef copies the current value of the GlobalTradeStationPrepareTradePokemonParam
// and returns a pointer to the new copy
func (gtsptpp GlobalTradeStationPrepareTradePokemonParam) CopyRef() types.RVTypePtr {
copied := gtsptpp.Copy().(GlobalTradeStationPrepareTradePokemonParam)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationPrepareTradePokemonParam
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsptpp *GlobalTradeStationPrepareTradePokemonParam) Deref() types.RVType {
return *gtsptpp
}

// String returns the string representation of the GlobalTradeStationPrepareTradePokemonParam
func (gtsptpp GlobalTradeStationPrepareTradePokemonParam) String() string {
return gtsptpp.FormatToString(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ func (gtsptpr GlobalTradeStationPrepareTradePokemonResult) Equals(o types.RVType
return gtsptpr.PrepareTradeKey.Equals(other.PrepareTradeKey)
}

// CopyRef copies the current value of the GlobalTradeStationPrepareTradePokemonResult
// and returns a pointer to the new copy
func (gtsptpr GlobalTradeStationPrepareTradePokemonResult) CopyRef() types.RVTypePtr {
copied := gtsptpr.Copy().(GlobalTradeStationPrepareTradePokemonResult)
return &copied
}

// Deref takes a pointer to the GlobalTradeStationPrepareTradePokemonResult
// and dereferences it to the raw value.
// Only useful when working with an instance of RVTypePtr
func (gtsptpr *GlobalTradeStationPrepareTradePokemonResult) Deref() types.RVType {
return *gtsptpr
}

// String returns the string representation of the GlobalTradeStationPrepareTradePokemonResult
func (gtsptpr GlobalTradeStationPrepareTradePokemonResult) String() string {
return gtsptpr.FormatToString(0)
Expand Down
Loading

0 comments on commit fe65565

Please sign in to comment.