encode<V> static method

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

Implementation

static V encode<V>(
  TerminalReaderReaderResourceProcessConfig instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.enableCustomerCancellation != null) {
    container.encodeBool(
      'enable_customer_cancellation',
      instance.enableCustomerCancellation!,
    );
  }
  if (instance.skipTipping != null) {
    container.encodeBool(
      'skip_tipping',
      instance.skipTipping!,
    );
  }
  if (instance.tipping != null) {
    TerminalReaderReaderResourceTippingConfig.encode(
      instance.tipping!,
      container.nestedSingleValueContainer('tipping').encoder,
    );
  }
  return container.value;
}