toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (clientName != null) 'client_name': clientName,
    if (clientUri != null) 'client_uri': clientUri,
    if (redirectUris != null) 'redirect_uris': redirectUris,
    if (grantTypes != null)
      'grant_types': grantTypes!.map((e) => e.value).toList(),
    if (responseTypes != null)
      'response_types': responseTypes!.map((e) => e.value).toList(),
    if (scope != null) 'scope': scope,
  };
}