toMfaInfo method

GoogleCloudIdentitytoolkitV1MfaInfo toMfaInfo()

Implementation

v1.GoogleCloudIdentitytoolkitV1MfaInfo toMfaInfo() {
  final enrolledFactors = this.enrolledFactors;
  if (enrolledFactors == null || enrolledFactors.isEmpty) {
    // Remove all second factors.
    return v1.GoogleCloudIdentitytoolkitV1MfaInfo();
  }

  return v1.GoogleCloudIdentitytoolkitV1MfaInfo(
    enrollments: enrolledFactors.map((e) => e.toMfaEnrollment()).toList(),
  );
}