AuthConfig.fromJson constructor

AuthConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AuthConfig.fromJson(Map<String, dynamic> json) {
  return AuthConfig(
    apiKeyConfig: decode(
      json['apiKeyConfig'],
      AuthConfig_ApiKeyConfig.fromJson,
    ),
    httpBasicAuthConfig: decode(
      json['httpBasicAuthConfig'],
      AuthConfig_HttpBasicAuthConfig.fromJson,
    ),
    googleServiceAccountConfig: decode(
      json['googleServiceAccountConfig'],
      AuthConfig_GoogleServiceAccountConfig.fromJson,
    ),
    oauthConfig: decode(json['oauthConfig'], AuthConfig_OauthConfig.fromJson),
    oidcConfig: decode(json['oidcConfig'], AuthConfig_OidcConfig.fromJson),
    authType:
        decodeEnum(json['authType'], AuthType.fromJson) ?? AuthType.$default,
  );
}