encode<V> static method

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

Implementation

static V encode<V>(
  TerminalConnectionToken instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.location != null) {
    container.encodeString(
      'location',
      instance.location!,
    );
  }
  container.encodeString(
    'object',
    'terminal.connection_token',
  );
  container.encodeString(
    'secret',
    instance.secret,
  );
  return container.value;
}