encode<V> static method

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

Implementation

static V encode<V>(
  TreasuryFinancialAccountsResourceTogglesSettingStatusDetails instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'code',
    instance.code,
  );
  if (instance.resolution != null) {
    container.encodeString(
      'resolution',
      instance.resolution!,
    );
  }
  if (instance.restriction != null) {
    container.encodeString(
      'restriction',
      instance.restriction!,
    );
  }
  return container.value;
}