BackendServiceConnectionTrackingPolicy.fromJson constructor

BackendServiceConnectionTrackingPolicy.fromJson(
  1. Object? j
)

Implementation

factory BackendServiceConnectionTrackingPolicy.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return BackendServiceConnectionTrackingPolicy(
    connectionPersistenceOnUnhealthyBackends:
        switch (json['connectionPersistenceOnUnhealthyBackends']) {
          null => null,
          Object $1 => decodeString($1),
        },
    enableStrongAffinity: switch (json['enableStrongAffinity']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    idleTimeoutSec: switch (json['idleTimeoutSec']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    trackingMode: switch (json['trackingMode']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}