package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
var (
_ = bin .Buffer {}
_ = context .Background ()
_ = fmt .Stringer (nil )
_ = strings .Builder {}
_ = errors .Is
_ = multierr .AppendInto
_ = sort .Ints
_ = tdp .Format
_ = tgerr .Error {}
_ = tdjson .Encoder {}
)
type SecureValueTypePersonalDetails struct {
}
const SecureValueTypePersonalDetailsTypeID = 0x9d2a81e3
func (s SecureValueTypePersonalDetails ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypePersonalDetails {}
_ bin .Decoder = &SecureValueTypePersonalDetails {}
_ bin .BareEncoder = &SecureValueTypePersonalDetails {}
_ bin .BareDecoder = &SecureValueTypePersonalDetails {}
_ SecureValueTypeClass = &SecureValueTypePersonalDetails {}
)
func (s *SecureValueTypePersonalDetails ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypePersonalDetails ) String () string {
if s == nil {
return "SecureValueTypePersonalDetails(nil)"
}
type Alias SecureValueTypePersonalDetails
return fmt .Sprintf ("SecureValueTypePersonalDetails%+v" , Alias (*s ))
}
func (*SecureValueTypePersonalDetails ) TypeID () uint32 {
return SecureValueTypePersonalDetailsTypeID
}
func (*SecureValueTypePersonalDetails ) TypeName () string {
return "secureValueTypePersonalDetails"
}
func (s *SecureValueTypePersonalDetails ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypePersonalDetails" ,
ID : SecureValueTypePersonalDetailsTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypePersonalDetails ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePersonalDetails#9d2a81e3 as nil" )
}
b .PutID (SecureValueTypePersonalDetailsTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypePersonalDetails ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePersonalDetails#9d2a81e3 as nil" )
}
return nil
}
func (s *SecureValueTypePersonalDetails ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePersonalDetails#9d2a81e3 to nil" )
}
if err := b .ConsumeID (SecureValueTypePersonalDetailsTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypePersonalDetails#9d2a81e3: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypePersonalDetails ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePersonalDetails#9d2a81e3 to nil" )
}
return nil
}
type SecureValueTypePassport struct {
}
const SecureValueTypePassportTypeID = 0x3dac6a00
func (s SecureValueTypePassport ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypePassport {}
_ bin .Decoder = &SecureValueTypePassport {}
_ bin .BareEncoder = &SecureValueTypePassport {}
_ bin .BareDecoder = &SecureValueTypePassport {}
_ SecureValueTypeClass = &SecureValueTypePassport {}
)
func (s *SecureValueTypePassport ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypePassport ) String () string {
if s == nil {
return "SecureValueTypePassport(nil)"
}
type Alias SecureValueTypePassport
return fmt .Sprintf ("SecureValueTypePassport%+v" , Alias (*s ))
}
func (*SecureValueTypePassport ) TypeID () uint32 {
return SecureValueTypePassportTypeID
}
func (*SecureValueTypePassport ) TypeName () string {
return "secureValueTypePassport"
}
func (s *SecureValueTypePassport ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypePassport" ,
ID : SecureValueTypePassportTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypePassport ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePassport#3dac6a00 as nil" )
}
b .PutID (SecureValueTypePassportTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypePassport ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePassport#3dac6a00 as nil" )
}
return nil
}
func (s *SecureValueTypePassport ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePassport#3dac6a00 to nil" )
}
if err := b .ConsumeID (SecureValueTypePassportTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypePassport#3dac6a00: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypePassport ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePassport#3dac6a00 to nil" )
}
return nil
}
type SecureValueTypeDriverLicense struct {
}
const SecureValueTypeDriverLicenseTypeID = 0x6e425c4
func (s SecureValueTypeDriverLicense ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeDriverLicense {}
_ bin .Decoder = &SecureValueTypeDriverLicense {}
_ bin .BareEncoder = &SecureValueTypeDriverLicense {}
_ bin .BareDecoder = &SecureValueTypeDriverLicense {}
_ SecureValueTypeClass = &SecureValueTypeDriverLicense {}
)
func (s *SecureValueTypeDriverLicense ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeDriverLicense ) String () string {
if s == nil {
return "SecureValueTypeDriverLicense(nil)"
}
type Alias SecureValueTypeDriverLicense
return fmt .Sprintf ("SecureValueTypeDriverLicense%+v" , Alias (*s ))
}
func (*SecureValueTypeDriverLicense ) TypeID () uint32 {
return SecureValueTypeDriverLicenseTypeID
}
func (*SecureValueTypeDriverLicense ) TypeName () string {
return "secureValueTypeDriverLicense"
}
func (s *SecureValueTypeDriverLicense ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeDriverLicense" ,
ID : SecureValueTypeDriverLicenseTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeDriverLicense ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeDriverLicense#6e425c4 as nil" )
}
b .PutID (SecureValueTypeDriverLicenseTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeDriverLicense ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeDriverLicense#6e425c4 as nil" )
}
return nil
}
func (s *SecureValueTypeDriverLicense ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeDriverLicense#6e425c4 to nil" )
}
if err := b .ConsumeID (SecureValueTypeDriverLicenseTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeDriverLicense#6e425c4: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeDriverLicense ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeDriverLicense#6e425c4 to nil" )
}
return nil
}
type SecureValueTypeIdentityCard struct {
}
const SecureValueTypeIdentityCardTypeID = 0xa0d0744b
func (s SecureValueTypeIdentityCard ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeIdentityCard {}
_ bin .Decoder = &SecureValueTypeIdentityCard {}
_ bin .BareEncoder = &SecureValueTypeIdentityCard {}
_ bin .BareDecoder = &SecureValueTypeIdentityCard {}
_ SecureValueTypeClass = &SecureValueTypeIdentityCard {}
)
func (s *SecureValueTypeIdentityCard ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeIdentityCard ) String () string {
if s == nil {
return "SecureValueTypeIdentityCard(nil)"
}
type Alias SecureValueTypeIdentityCard
return fmt .Sprintf ("SecureValueTypeIdentityCard%+v" , Alias (*s ))
}
func (*SecureValueTypeIdentityCard ) TypeID () uint32 {
return SecureValueTypeIdentityCardTypeID
}
func (*SecureValueTypeIdentityCard ) TypeName () string {
return "secureValueTypeIdentityCard"
}
func (s *SecureValueTypeIdentityCard ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeIdentityCard" ,
ID : SecureValueTypeIdentityCardTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeIdentityCard ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeIdentityCard#a0d0744b as nil" )
}
b .PutID (SecureValueTypeIdentityCardTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeIdentityCard ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeIdentityCard#a0d0744b as nil" )
}
return nil
}
func (s *SecureValueTypeIdentityCard ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeIdentityCard#a0d0744b to nil" )
}
if err := b .ConsumeID (SecureValueTypeIdentityCardTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeIdentityCard#a0d0744b: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeIdentityCard ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeIdentityCard#a0d0744b to nil" )
}
return nil
}
type SecureValueTypeInternalPassport struct {
}
const SecureValueTypeInternalPassportTypeID = 0x99a48f23
func (s SecureValueTypeInternalPassport ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeInternalPassport {}
_ bin .Decoder = &SecureValueTypeInternalPassport {}
_ bin .BareEncoder = &SecureValueTypeInternalPassport {}
_ bin .BareDecoder = &SecureValueTypeInternalPassport {}
_ SecureValueTypeClass = &SecureValueTypeInternalPassport {}
)
func (s *SecureValueTypeInternalPassport ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeInternalPassport ) String () string {
if s == nil {
return "SecureValueTypeInternalPassport(nil)"
}
type Alias SecureValueTypeInternalPassport
return fmt .Sprintf ("SecureValueTypeInternalPassport%+v" , Alias (*s ))
}
func (*SecureValueTypeInternalPassport ) TypeID () uint32 {
return SecureValueTypeInternalPassportTypeID
}
func (*SecureValueTypeInternalPassport ) TypeName () string {
return "secureValueTypeInternalPassport"
}
func (s *SecureValueTypeInternalPassport ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeInternalPassport" ,
ID : SecureValueTypeInternalPassportTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeInternalPassport ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeInternalPassport#99a48f23 as nil" )
}
b .PutID (SecureValueTypeInternalPassportTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeInternalPassport ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeInternalPassport#99a48f23 as nil" )
}
return nil
}
func (s *SecureValueTypeInternalPassport ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeInternalPassport#99a48f23 to nil" )
}
if err := b .ConsumeID (SecureValueTypeInternalPassportTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeInternalPassport#99a48f23: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeInternalPassport ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeInternalPassport#99a48f23 to nil" )
}
return nil
}
type SecureValueTypeAddress struct {
}
const SecureValueTypeAddressTypeID = 0xcbe31e26
func (s SecureValueTypeAddress ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeAddress {}
_ bin .Decoder = &SecureValueTypeAddress {}
_ bin .BareEncoder = &SecureValueTypeAddress {}
_ bin .BareDecoder = &SecureValueTypeAddress {}
_ SecureValueTypeClass = &SecureValueTypeAddress {}
)
func (s *SecureValueTypeAddress ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeAddress ) String () string {
if s == nil {
return "SecureValueTypeAddress(nil)"
}
type Alias SecureValueTypeAddress
return fmt .Sprintf ("SecureValueTypeAddress%+v" , Alias (*s ))
}
func (*SecureValueTypeAddress ) TypeID () uint32 {
return SecureValueTypeAddressTypeID
}
func (*SecureValueTypeAddress ) TypeName () string {
return "secureValueTypeAddress"
}
func (s *SecureValueTypeAddress ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeAddress" ,
ID : SecureValueTypeAddressTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeAddress ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeAddress#cbe31e26 as nil" )
}
b .PutID (SecureValueTypeAddressTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeAddress ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeAddress#cbe31e26 as nil" )
}
return nil
}
func (s *SecureValueTypeAddress ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeAddress#cbe31e26 to nil" )
}
if err := b .ConsumeID (SecureValueTypeAddressTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeAddress#cbe31e26: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeAddress ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeAddress#cbe31e26 to nil" )
}
return nil
}
type SecureValueTypeUtilityBill struct {
}
const SecureValueTypeUtilityBillTypeID = 0xfc36954e
func (s SecureValueTypeUtilityBill ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeUtilityBill {}
_ bin .Decoder = &SecureValueTypeUtilityBill {}
_ bin .BareEncoder = &SecureValueTypeUtilityBill {}
_ bin .BareDecoder = &SecureValueTypeUtilityBill {}
_ SecureValueTypeClass = &SecureValueTypeUtilityBill {}
)
func (s *SecureValueTypeUtilityBill ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeUtilityBill ) String () string {
if s == nil {
return "SecureValueTypeUtilityBill(nil)"
}
type Alias SecureValueTypeUtilityBill
return fmt .Sprintf ("SecureValueTypeUtilityBill%+v" , Alias (*s ))
}
func (*SecureValueTypeUtilityBill ) TypeID () uint32 {
return SecureValueTypeUtilityBillTypeID
}
func (*SecureValueTypeUtilityBill ) TypeName () string {
return "secureValueTypeUtilityBill"
}
func (s *SecureValueTypeUtilityBill ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeUtilityBill" ,
ID : SecureValueTypeUtilityBillTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeUtilityBill ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeUtilityBill#fc36954e as nil" )
}
b .PutID (SecureValueTypeUtilityBillTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeUtilityBill ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeUtilityBill#fc36954e as nil" )
}
return nil
}
func (s *SecureValueTypeUtilityBill ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeUtilityBill#fc36954e to nil" )
}
if err := b .ConsumeID (SecureValueTypeUtilityBillTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeUtilityBill#fc36954e: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeUtilityBill ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeUtilityBill#fc36954e to nil" )
}
return nil
}
type SecureValueTypeBankStatement struct {
}
const SecureValueTypeBankStatementTypeID = 0x89137c0d
func (s SecureValueTypeBankStatement ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeBankStatement {}
_ bin .Decoder = &SecureValueTypeBankStatement {}
_ bin .BareEncoder = &SecureValueTypeBankStatement {}
_ bin .BareDecoder = &SecureValueTypeBankStatement {}
_ SecureValueTypeClass = &SecureValueTypeBankStatement {}
)
func (s *SecureValueTypeBankStatement ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeBankStatement ) String () string {
if s == nil {
return "SecureValueTypeBankStatement(nil)"
}
type Alias SecureValueTypeBankStatement
return fmt .Sprintf ("SecureValueTypeBankStatement%+v" , Alias (*s ))
}
func (*SecureValueTypeBankStatement ) TypeID () uint32 {
return SecureValueTypeBankStatementTypeID
}
func (*SecureValueTypeBankStatement ) TypeName () string {
return "secureValueTypeBankStatement"
}
func (s *SecureValueTypeBankStatement ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeBankStatement" ,
ID : SecureValueTypeBankStatementTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeBankStatement ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeBankStatement#89137c0d as nil" )
}
b .PutID (SecureValueTypeBankStatementTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeBankStatement ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeBankStatement#89137c0d as nil" )
}
return nil
}
func (s *SecureValueTypeBankStatement ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeBankStatement#89137c0d to nil" )
}
if err := b .ConsumeID (SecureValueTypeBankStatementTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeBankStatement#89137c0d: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeBankStatement ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeBankStatement#89137c0d to nil" )
}
return nil
}
type SecureValueTypeRentalAgreement struct {
}
const SecureValueTypeRentalAgreementTypeID = 0x8b883488
func (s SecureValueTypeRentalAgreement ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeRentalAgreement {}
_ bin .Decoder = &SecureValueTypeRentalAgreement {}
_ bin .BareEncoder = &SecureValueTypeRentalAgreement {}
_ bin .BareDecoder = &SecureValueTypeRentalAgreement {}
_ SecureValueTypeClass = &SecureValueTypeRentalAgreement {}
)
func (s *SecureValueTypeRentalAgreement ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeRentalAgreement ) String () string {
if s == nil {
return "SecureValueTypeRentalAgreement(nil)"
}
type Alias SecureValueTypeRentalAgreement
return fmt .Sprintf ("SecureValueTypeRentalAgreement%+v" , Alias (*s ))
}
func (*SecureValueTypeRentalAgreement ) TypeID () uint32 {
return SecureValueTypeRentalAgreementTypeID
}
func (*SecureValueTypeRentalAgreement ) TypeName () string {
return "secureValueTypeRentalAgreement"
}
func (s *SecureValueTypeRentalAgreement ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeRentalAgreement" ,
ID : SecureValueTypeRentalAgreementTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeRentalAgreement ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeRentalAgreement#8b883488 as nil" )
}
b .PutID (SecureValueTypeRentalAgreementTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeRentalAgreement ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeRentalAgreement#8b883488 as nil" )
}
return nil
}
func (s *SecureValueTypeRentalAgreement ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeRentalAgreement#8b883488 to nil" )
}
if err := b .ConsumeID (SecureValueTypeRentalAgreementTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeRentalAgreement#8b883488: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeRentalAgreement ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeRentalAgreement#8b883488 to nil" )
}
return nil
}
type SecureValueTypePassportRegistration struct {
}
const SecureValueTypePassportRegistrationTypeID = 0x99e3806a
func (s SecureValueTypePassportRegistration ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypePassportRegistration {}
_ bin .Decoder = &SecureValueTypePassportRegistration {}
_ bin .BareEncoder = &SecureValueTypePassportRegistration {}
_ bin .BareDecoder = &SecureValueTypePassportRegistration {}
_ SecureValueTypeClass = &SecureValueTypePassportRegistration {}
)
func (s *SecureValueTypePassportRegistration ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypePassportRegistration ) String () string {
if s == nil {
return "SecureValueTypePassportRegistration(nil)"
}
type Alias SecureValueTypePassportRegistration
return fmt .Sprintf ("SecureValueTypePassportRegistration%+v" , Alias (*s ))
}
func (*SecureValueTypePassportRegistration ) TypeID () uint32 {
return SecureValueTypePassportRegistrationTypeID
}
func (*SecureValueTypePassportRegistration ) TypeName () string {
return "secureValueTypePassportRegistration"
}
func (s *SecureValueTypePassportRegistration ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypePassportRegistration" ,
ID : SecureValueTypePassportRegistrationTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypePassportRegistration ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePassportRegistration#99e3806a as nil" )
}
b .PutID (SecureValueTypePassportRegistrationTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypePassportRegistration ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePassportRegistration#99e3806a as nil" )
}
return nil
}
func (s *SecureValueTypePassportRegistration ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePassportRegistration#99e3806a to nil" )
}
if err := b .ConsumeID (SecureValueTypePassportRegistrationTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypePassportRegistration#99e3806a: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypePassportRegistration ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePassportRegistration#99e3806a to nil" )
}
return nil
}
type SecureValueTypeTemporaryRegistration struct {
}
const SecureValueTypeTemporaryRegistrationTypeID = 0xea02ec33
func (s SecureValueTypeTemporaryRegistration ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeTemporaryRegistration {}
_ bin .Decoder = &SecureValueTypeTemporaryRegistration {}
_ bin .BareEncoder = &SecureValueTypeTemporaryRegistration {}
_ bin .BareDecoder = &SecureValueTypeTemporaryRegistration {}
_ SecureValueTypeClass = &SecureValueTypeTemporaryRegistration {}
)
func (s *SecureValueTypeTemporaryRegistration ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeTemporaryRegistration ) String () string {
if s == nil {
return "SecureValueTypeTemporaryRegistration(nil)"
}
type Alias SecureValueTypeTemporaryRegistration
return fmt .Sprintf ("SecureValueTypeTemporaryRegistration%+v" , Alias (*s ))
}
func (*SecureValueTypeTemporaryRegistration ) TypeID () uint32 {
return SecureValueTypeTemporaryRegistrationTypeID
}
func (*SecureValueTypeTemporaryRegistration ) TypeName () string {
return "secureValueTypeTemporaryRegistration"
}
func (s *SecureValueTypeTemporaryRegistration ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeTemporaryRegistration" ,
ID : SecureValueTypeTemporaryRegistrationTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeTemporaryRegistration ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeTemporaryRegistration#ea02ec33 as nil" )
}
b .PutID (SecureValueTypeTemporaryRegistrationTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeTemporaryRegistration ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeTemporaryRegistration#ea02ec33 as nil" )
}
return nil
}
func (s *SecureValueTypeTemporaryRegistration ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeTemporaryRegistration#ea02ec33 to nil" )
}
if err := b .ConsumeID (SecureValueTypeTemporaryRegistrationTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeTemporaryRegistration#ea02ec33: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeTemporaryRegistration ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeTemporaryRegistration#ea02ec33 to nil" )
}
return nil
}
type SecureValueTypePhone struct {
}
const SecureValueTypePhoneTypeID = 0xb320aadb
func (s SecureValueTypePhone ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypePhone {}
_ bin .Decoder = &SecureValueTypePhone {}
_ bin .BareEncoder = &SecureValueTypePhone {}
_ bin .BareDecoder = &SecureValueTypePhone {}
_ SecureValueTypeClass = &SecureValueTypePhone {}
)
func (s *SecureValueTypePhone ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypePhone ) String () string {
if s == nil {
return "SecureValueTypePhone(nil)"
}
type Alias SecureValueTypePhone
return fmt .Sprintf ("SecureValueTypePhone%+v" , Alias (*s ))
}
func (*SecureValueTypePhone ) TypeID () uint32 {
return SecureValueTypePhoneTypeID
}
func (*SecureValueTypePhone ) TypeName () string {
return "secureValueTypePhone"
}
func (s *SecureValueTypePhone ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypePhone" ,
ID : SecureValueTypePhoneTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypePhone ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePhone#b320aadb as nil" )
}
b .PutID (SecureValueTypePhoneTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypePhone ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypePhone#b320aadb as nil" )
}
return nil
}
func (s *SecureValueTypePhone ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePhone#b320aadb to nil" )
}
if err := b .ConsumeID (SecureValueTypePhoneTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypePhone#b320aadb: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypePhone ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypePhone#b320aadb to nil" )
}
return nil
}
type SecureValueTypeEmail struct {
}
const SecureValueTypeEmailTypeID = 0x8e3ca7ee
func (s SecureValueTypeEmail ) construct () SecureValueTypeClass { return &s }
var (
_ bin .Encoder = &SecureValueTypeEmail {}
_ bin .Decoder = &SecureValueTypeEmail {}
_ bin .BareEncoder = &SecureValueTypeEmail {}
_ bin .BareDecoder = &SecureValueTypeEmail {}
_ SecureValueTypeClass = &SecureValueTypeEmail {}
)
func (s *SecureValueTypeEmail ) Zero () bool {
if s == nil {
return true
}
return true
}
func (s *SecureValueTypeEmail ) String () string {
if s == nil {
return "SecureValueTypeEmail(nil)"
}
type Alias SecureValueTypeEmail
return fmt .Sprintf ("SecureValueTypeEmail%+v" , Alias (*s ))
}
func (*SecureValueTypeEmail ) TypeID () uint32 {
return SecureValueTypeEmailTypeID
}
func (*SecureValueTypeEmail ) TypeName () string {
return "secureValueTypeEmail"
}
func (s *SecureValueTypeEmail ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "secureValueTypeEmail" ,
ID : SecureValueTypeEmailTypeID ,
}
if s == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (s *SecureValueTypeEmail ) Encode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeEmail#8e3ca7ee as nil" )
}
b .PutID (SecureValueTypeEmailTypeID )
return s .EncodeBare (b )
}
func (s *SecureValueTypeEmail ) EncodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't encode secureValueTypeEmail#8e3ca7ee as nil" )
}
return nil
}
func (s *SecureValueTypeEmail ) Decode (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeEmail#8e3ca7ee to nil" )
}
if err := b .ConsumeID (SecureValueTypeEmailTypeID ); err != nil {
return fmt .Errorf ("unable to decode secureValueTypeEmail#8e3ca7ee: %w" , err )
}
return s .DecodeBare (b )
}
func (s *SecureValueTypeEmail ) DecodeBare (b *bin .Buffer ) error {
if s == nil {
return fmt .Errorf ("can't decode secureValueTypeEmail#8e3ca7ee to nil" )
}
return nil
}
const SecureValueTypeClassName = "SecureValueType"
type SecureValueTypeClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () SecureValueTypeClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
}
func DecodeSecureValueType (buf *bin .Buffer ) (SecureValueTypeClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case SecureValueTypePersonalDetailsTypeID :
v := SecureValueTypePersonalDetails {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypePassportTypeID :
v := SecureValueTypePassport {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeDriverLicenseTypeID :
v := SecureValueTypeDriverLicense {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeIdentityCardTypeID :
v := SecureValueTypeIdentityCard {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeInternalPassportTypeID :
v := SecureValueTypeInternalPassport {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeAddressTypeID :
v := SecureValueTypeAddress {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeUtilityBillTypeID :
v := SecureValueTypeUtilityBill {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeBankStatementTypeID :
v := SecureValueTypeBankStatement {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeRentalAgreementTypeID :
v := SecureValueTypeRentalAgreement {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypePassportRegistrationTypeID :
v := SecureValueTypePassportRegistration {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeTemporaryRegistrationTypeID :
v := SecureValueTypeTemporaryRegistration {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypePhoneTypeID :
v := SecureValueTypePhone {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
case SecureValueTypeEmailTypeID :
v := SecureValueTypeEmail {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode SecureValueTypeClass: %w" , bin .NewUnexpectedID (id ))
}
}
type SecureValueTypeBox struct {
SecureValueType SecureValueTypeClass
}
func (b *SecureValueTypeBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode SecureValueTypeBox to nil" )
}
v , err := DecodeSecureValueType (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .SecureValueType = v
return nil
}
func (b *SecureValueTypeBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .SecureValueType == nil {
return fmt .Errorf ("unable to encode SecureValueTypeClass as nil" )
}
return b .SecureValueType .Encode (buf )
}
The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .