PatchSubnetworkRequest.fromJson constructor

PatchSubnetworkRequest.fromJson(
  1. Object? j
)

Implementation

factory PatchSubnetworkRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return PatchSubnetworkRequest(
    drainTimeoutSeconds: switch (json['drainTimeoutSeconds']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    project: switch (json['project']) {
      null => '',
      Object $1 => decodeString($1),
    },
    region: switch (json['region']) {
      null => '',
      Object $1 => decodeString($1),
    },
    requestId: switch (json['requestId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    subnetwork: switch (json['subnetwork']) {
      null => '',
      Object $1 => decodeString($1),
    },
    subnetworkResource: switch (json['subnetworkResource']) {
      null => null,
      Object $1 => Subnetwork.fromJson($1),
    },
  );
}