func NewOperationResultTr(aType OperationType, value interface{}) (result OperationResultTr, err error) {
	result.Type = aType
	switch OperationType(aType) {
	case OperationTypeCreateAccount:
		tv, ok := value.(CreateAccountResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be CreateAccountResult")
			return
		}
		result.CreateAccountResult = &tv
	case OperationTypePayment:
		tv, ok := value.(PaymentResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be PaymentResult")
			return
		}
		result.PaymentResult = &tv
	case OperationTypePathPayment:
		tv, ok := value.(PathPaymentResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be PathPaymentResult")
			return
		}
		result.PathPaymentResult = &tv
	case OperationTypeManageOffer:
		tv, ok := value.(ManageOfferResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageOfferResult")
			return
		}
		result.ManageOfferResult = &tv
	case OperationTypeCreatePassiveOffer:
		tv, ok := value.(ManageOfferResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageOfferResult")
			return
		}
		result.CreatePassiveOfferResult = &tv
	case OperationTypeSetOptions:
		tv, ok := value.(SetOptionsResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be SetOptionsResult")
			return
		}
		result.SetOptionsResult = &tv
	case OperationTypeChangeTrust:
		tv, ok := value.(ChangeTrustResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ChangeTrustResult")
			return
		}
		result.ChangeTrustResult = &tv
	case OperationTypeAllowTrust:
		tv, ok := value.(AllowTrustResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be AllowTrustResult")
			return
		}
		result.AllowTrustResult = &tv
	case OperationTypeAccountMerge:
		tv, ok := value.(AccountMergeResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be AccountMergeResult")
			return
		}
		result.AccountMergeResult = &tv
	case OperationTypeInflation:
		tv, ok := value.(InflationResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be InflationResult")
			return
		}
		result.InflationResult = &tv
	case OperationTypeManageData:
		tv, ok := value.(ManageDataResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageDataResult")
			return
		}
		result.ManageDataResult = &tv
	}
	return
}
func NewOperationResultTr(aType OperationType, value interface{}) (result OperationResultTr, err error) {
	result.Type = aType
	switch OperationType(aType) {
	case OperationTypeCreateAccount:
		tv, ok := value.(CreateAccountResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be CreateAccountResult")
			return
		}
		result.CreateAccountResult = &tv
	case OperationTypePayment:
		tv, ok := value.(PaymentResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be PaymentResult")
			return
		}
		result.PaymentResult = &tv
	case OperationTypePathPayment:
		tv, ok := value.(PathPaymentResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be PathPaymentResult")
			return
		}
		result.PathPaymentResult = &tv
	case OperationTypeManageOffer:
		tv, ok := value.(ManageOfferResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageOfferResult")
			return
		}
		result.ManageOfferResult = &tv
	case OperationTypeCreatePassiveOffer:
		tv, ok := value.(ManageOfferResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageOfferResult")
			return
		}
		result.CreatePassiveOfferResult = &tv
	case OperationTypeSetOptions:
		tv, ok := value.(SetOptionsResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be SetOptionsResult")
			return
		}
		result.SetOptionsResult = &tv
	case OperationTypeChangeTrust:
		tv, ok := value.(ChangeTrustResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ChangeTrustResult")
			return
		}
		result.ChangeTrustResult = &tv
	case OperationTypeAllowTrust:
		tv, ok := value.(AllowTrustResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be AllowTrustResult")
			return
		}
		result.AllowTrustResult = &tv
	case OperationTypeAccountMerge:
		tv, ok := value.(AccountMergeResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be AccountMergeResult")
			return
		}
		result.AccountMergeResult = &tv
	case OperationTypeInflation:
		tv, ok := value.(InflationResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be InflationResult")
			return
		}
		result.InflationResult = &tv
	case OperationTypeManageData:
		tv, ok := value.(ManageDataResult)
		if !ok {
			err = fmt.Errorf("invalid value, must be ManageDataResult")
			return
		}
		result.ManageDataResult = &tv
	}
	return
}
func NewOperationResultTr ( aType OperationType , value interface { } ) ( result OperationResultTr , err error ) { result . Type = aType switch OperationType ( aType ) { case OperationTypeCreateAccount : tv , ok := value . ( CreateAccountResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . CreateAccountResult = & tv case OperationTypePayment : tv , ok := value . ( PaymentResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . PaymentResult = & tv case OperationTypePathPayment : tv , ok := value . ( PathPaymentResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . PathPaymentResult = & tv case OperationTypeManageOffer : tv , ok := value . ( ManageOfferResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . ManageOfferResult = & tv case OperationTypeCreatePassiveOffer : tv , ok := value . ( ManageOfferResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . CreatePassiveOfferResult = & tv case OperationTypeSetOptions : tv , ok := value . ( SetOptionsResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . SetOptionsResult = & tv case OperationTypeChangeTrust : tv , ok := value . ( ChangeTrustResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . ChangeTrustResult = & tv case OperationTypeAllowTrust : tv , ok := value . ( AllowTrustResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . AllowTrustResult = & tv case OperationTypeAccountMerge : tv , ok := value . ( AccountMergeResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . AccountMergeResult = & tv case OperationTypeInflation : tv , ok := value . ( InflationResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . InflationResult = & tv case OperationTypeManageData : tv , ok := value . ( ManageDataResult ) if ! ok { err = fmt . Errorf ( " " ) return } result . ManageDataResult = & tv } return }
// NewOperationResultTr creates a new  OperationResultTr.
NewOperationResultTr creates a new OperationResultTr .