toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.userId != null) {
    json[r'user_id'] = this.userId;
  } else {
    json[r'user_id'] = null;
  }
  if (this.companyId != null) {
    json[r'company_id'] = this.companyId;
  } else {
    json[r'company_id'] = null;
  }
  if (this.roleId != null) {
    json[r'role_id'] = this.roleId;
  } else {
    json[r'role_id'] = null;
  }
  if (this.keyType != null) {
    json[r'key_type'] = this.keyType;
  } else {
    json[r'key_type'] = null;
  }
  if (this.isSystemGenerated != null) {
    json[r'is_system_generated'] = this.isSystemGenerated;
  } else {
    json[r'is_system_generated'] = null;
  }
  if (this.mcpDeploymentId != null) {
    json[r'mcp_deployment_id'] = this.mcpDeploymentId;
  } else {
    json[r'mcp_deployment_id'] = null;
  }
  if (this.endpointId != null) {
    json[r'endpoint_id'] = this.endpointId;
  } else {
    json[r'endpoint_id'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.expirationDateUtc != null) {
    json[r'expiration_date_utc'] = this.expirationDateUtc!.toUtc().toIso8601String();
  } else {
    json[r'expiration_date_utc'] = null;
  }
  return json;
}