SetIamPolicyRequest.fromJson constructor

SetIamPolicyRequest.fromJson(
  1. Object? j
)

Implementation

factory SetIamPolicyRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return SetIamPolicyRequest(
    resource: switch (json['resource']) {
      null => '',
      Object $1 => decodeString($1),
    },
    policy: switch (json['policy']) {
      null => null,
      Object $1 => Policy.fromJson($1),
    },
    updateMask: switch (json['updateMask']) {
      null => null,
      Object $1 => FieldMask.fromJson($1),
    },
  );
}