encode<V> static method

V encode<V>(
  1. TaxProductRegistrationsResourceCountryOptions instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  TaxProductRegistrationsResourceCountryOptions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.ae != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.ae!,
      container.nestedSingleValueContainer('ae').encoder,
    );
  }
  if (instance.at != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.at!,
      container.nestedSingleValueContainer('at').encoder,
    );
  }
  if (instance.au != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.au!,
      container.nestedSingleValueContainer('au').encoder,
    );
  }
  if (instance.be != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.be!,
      container.nestedSingleValueContainer('be').encoder,
    );
  }
  if (instance.bg != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.bg!,
      container.nestedSingleValueContainer('bg').encoder,
    );
  }
  if (instance.ca != null) {
    TaxProductRegistrationsResourceCountryOptionsCanada.encode(
      instance.ca!,
      container.nestedSingleValueContainer('ca').encoder,
    );
  }
  if (instance.ch != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.ch!,
      container.nestedSingleValueContainer('ch').encoder,
    );
  }
  if (instance.cl != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.cl!,
      container.nestedSingleValueContainer('cl').encoder,
    );
  }
  if (instance.co != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.co!,
      container.nestedSingleValueContainer('co').encoder,
    );
  }
  if (instance.cy != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.cy!,
      container.nestedSingleValueContainer('cy').encoder,
    );
  }
  if (instance.cz != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.cz!,
      container.nestedSingleValueContainer('cz').encoder,
    );
  }
  if (instance.de != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.de!,
      container.nestedSingleValueContainer('de').encoder,
    );
  }
  if (instance.dk != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.dk!,
      container.nestedSingleValueContainer('dk').encoder,
    );
  }
  if (instance.ee != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.ee!,
      container.nestedSingleValueContainer('ee').encoder,
    );
  }
  if (instance.es != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.es!,
      container.nestedSingleValueContainer('es').encoder,
    );
  }
  if (instance.fi != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.fi!,
      container.nestedSingleValueContainer('fi').encoder,
    );
  }
  if (instance.fr != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.fr!,
      container.nestedSingleValueContainer('fr').encoder,
    );
  }
  if (instance.gb != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.gb!,
      container.nestedSingleValueContainer('gb').encoder,
    );
  }
  if (instance.gr != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.gr!,
      container.nestedSingleValueContainer('gr').encoder,
    );
  }
  if (instance.hr != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.hr!,
      container.nestedSingleValueContainer('hr').encoder,
    );
  }
  if (instance.hu != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.hu!,
      container.nestedSingleValueContainer('hu').encoder,
    );
  }
  if (instance.id != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.id!,
      container.nestedSingleValueContainer('id').encoder,
    );
  }
  if (instance.ie != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.ie!,
      container.nestedSingleValueContainer('ie').encoder,
    );
  }
  if (instance.is_ != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.is_!,
      container.nestedSingleValueContainer('is').encoder,
    );
  }
  if (instance.it != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.it!,
      container.nestedSingleValueContainer('it').encoder,
    );
  }
  if (instance.jp != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.jp!,
      container.nestedSingleValueContainer('jp').encoder,
    );
  }
  if (instance.kr != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.kr!,
      container.nestedSingleValueContainer('kr').encoder,
    );
  }
  if (instance.lt != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.lt!,
      container.nestedSingleValueContainer('lt').encoder,
    );
  }
  if (instance.lu != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.lu!,
      container.nestedSingleValueContainer('lu').encoder,
    );
  }
  if (instance.lv != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.lv!,
      container.nestedSingleValueContainer('lv').encoder,
    );
  }
  if (instance.mt != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.mt!,
      container.nestedSingleValueContainer('mt').encoder,
    );
  }
  if (instance.mx != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.mx!,
      container.nestedSingleValueContainer('mx').encoder,
    );
  }
  if (instance.my != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.my!,
      container.nestedSingleValueContainer('my').encoder,
    );
  }
  if (instance.nl != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.nl!,
      container.nestedSingleValueContainer('nl').encoder,
    );
  }
  if (instance.no != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.no!,
      container.nestedSingleValueContainer('no').encoder,
    );
  }
  if (instance.nz != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.nz!,
      container.nestedSingleValueContainer('nz').encoder,
    );
  }
  if (instance.pl != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.pl!,
      container.nestedSingleValueContainer('pl').encoder,
    );
  }
  if (instance.pt != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.pt!,
      container.nestedSingleValueContainer('pt').encoder,
    );
  }
  if (instance.ro != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.ro!,
      container.nestedSingleValueContainer('ro').encoder,
    );
  }
  if (instance.sa != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.sa!,
      container.nestedSingleValueContainer('sa').encoder,
    );
  }
  if (instance.se != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.se!,
      container.nestedSingleValueContainer('se').encoder,
    );
  }
  if (instance.sg != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.sg!,
      container.nestedSingleValueContainer('sg').encoder,
    );
  }
  if (instance.si != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.si!,
      container.nestedSingleValueContainer('si').encoder,
    );
  }
  if (instance.sk != null) {
    TaxProductRegistrationsResourceCountryOptionsEurope.encode(
      instance.sk!,
      container.nestedSingleValueContainer('sk').encoder,
    );
  }
  if (instance.th != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.th!,
      container.nestedSingleValueContainer('th').encoder,
    );
  }
  if (instance.tr != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.tr!,
      container.nestedSingleValueContainer('tr').encoder,
    );
  }
  if (instance.us != null) {
    TaxProductRegistrationsResourceCountryOptionsUnitedStates.encode(
      instance.us!,
      container.nestedSingleValueContainer('us').encoder,
    );
  }
  if (instance.vn != null) {
    TaxProductRegistrationsResourceCountryOptionsSimplified.encode(
      instance.vn!,
      container.nestedSingleValueContainer('vn').encoder,
    );
  }
  if (instance.za != null) {
    TaxProductRegistrationsResourceCountryOptionsDefault.encode(
      instance.za!,
      container.nestedSingleValueContainer('za').encoder,
    );
  }
  return container.value;
}