UserPoolClientType.fromJson constructor
UserPoolClientType.fromJson(
- Map<String, dynamic> json
)
Implementation
factory UserPoolClientType.fromJson(Map<String, dynamic> json) {
return UserPoolClientType(
accessTokenValidity: json['AccessTokenValidity'] as int?,
allowedOAuthFlows: (json['AllowedOAuthFlows'] as List?)
?.whereNotNull()
.map((e) => (e as String).toOAuthFlowType())
.toList(),
allowedOAuthFlowsUserPoolClient:
json['AllowedOAuthFlowsUserPoolClient'] as bool?,
allowedOAuthScopes: (json['AllowedOAuthScopes'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
analyticsConfiguration: json['AnalyticsConfiguration'] != null
? AnalyticsConfigurationType.fromJson(
json['AnalyticsConfiguration'] as Map<String, dynamic>)
: null,
callbackURLs: (json['CallbackURLs'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
clientId: json['ClientId'] as String?,
clientName: json['ClientName'] as String?,
clientSecret: json['ClientSecret'] as String?,
creationDate: timeStampFromJson(json['CreationDate']),
defaultRedirectURI: json['DefaultRedirectURI'] as String?,
explicitAuthFlows: (json['ExplicitAuthFlows'] as List?)
?.whereNotNull()
.map((e) => (e as String).toExplicitAuthFlowsType())
.toList(),
idTokenValidity: json['IdTokenValidity'] as int?,
lastModifiedDate: timeStampFromJson(json['LastModifiedDate']),
logoutURLs: (json['LogoutURLs'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
preventUserExistenceErrors:
(json['PreventUserExistenceErrors'] as String?)
?.toPreventUserExistenceErrorTypes(),
readAttributes: (json['ReadAttributes'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
refreshTokenValidity: json['RefreshTokenValidity'] as int?,
supportedIdentityProviders: (json['SupportedIdentityProviders'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
tokenValidityUnits: json['TokenValidityUnits'] != null
? TokenValidityUnitsType.fromJson(
json['TokenValidityUnits'] as Map<String, dynamic>)
: null,
userPoolId: json['UserPoolId'] as String?,
writeAttributes: (json['WriteAttributes'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
);
}