diff --git a/Content/BP_BugMarkerActor.uasset b/Content/BP_BugMarkerActor.uasset index 8c4e9aa..9b84dd7 100644 Binary files a/Content/BP_BugMarkerActor.uasset and b/Content/BP_BugMarkerActor.uasset differ diff --git a/Content/BP_BugMarkerActorDummy.uasset b/Content/BP_BugMarkerActorDummy.uasset new file mode 100644 index 0000000..764326c Binary files /dev/null and b/Content/BP_BugMarkerActorDummy.uasset differ diff --git a/Content/BP_BugPlacerPawn.uasset b/Content/BP_BugPlacerPawn.uasset index 23b90d1..ebdc9d7 100644 Binary files a/Content/BP_BugPlacerPawn.uasset and b/Content/BP_BugPlacerPawn.uasset differ diff --git a/Content/C_BuggieDistance.uasset b/Content/C_BuggieDistance.uasset index 5ecb537..9683b90 100644 Binary files a/Content/C_BuggieDistance.uasset and b/Content/C_BuggieDistance.uasset differ diff --git a/Content/M_BuggieIcon.uasset b/Content/M_BuggieIcon.uasset index 20b4aca..6dc976c 100644 Binary files a/Content/M_BuggieIcon.uasset and b/Content/M_BuggieIcon.uasset differ diff --git a/Content/M_IDText.uasset b/Content/M_IDText.uasset new file mode 100644 index 0000000..1155d6c Binary files /dev/null and b/Content/M_IDText.uasset differ diff --git a/Content/UI/M_BugPlacementReticle.uasset b/Content/UI/M_BugPlacementReticle.uasset new file mode 100644 index 0000000..2cbd514 Binary files /dev/null and b/Content/UI/M_BugPlacementReticle.uasset differ diff --git a/Content/UI/T_BugPlacementReticle.uasset b/Content/UI/T_BugPlacementReticle.uasset new file mode 100644 index 0000000..6ff1a2f Binary files /dev/null and b/Content/UI/T_BugPlacementReticle.uasset differ diff --git a/Content/UI/UMG_BugPlacementOverlay.uasset b/Content/UI/UMG_BugPlacementOverlay.uasset new file mode 100644 index 0000000..a78a167 Binary files /dev/null and b/Content/UI/UMG_BugPlacementOverlay.uasset differ diff --git a/Source/Unrealzilla/Private/BugMarkerActor.cpp b/Source/Unrealzilla/Private/BugMarkerActor.cpp index 795e744..a9ad55c 100644 --- a/Source/Unrealzilla/Private/BugMarkerActor.cpp +++ b/Source/Unrealzilla/Private/BugMarkerActor.cpp @@ -8,3 +8,20 @@ +EBugStatus ABugMarkerActor::GetBugStatus() const +{ + if (GetDefault()->ResolvedStatuses.Contains(this->BugData.status)) + { + return EBugStatus::Resolved; + } + else if (GetDefault()->InProgressStatuses.Contains(this->BugData.status)) + { + return EBugStatus::InProgress; + } + else if (GetDefault()->UnresolvedStatuses.Contains(this->BugData.status)) + { + return EBugStatus::Unresolved; + } + + return EBugStatus::NoStatus; +} diff --git a/Source/Unrealzilla/Private/BugMarkerLoader.cpp b/Source/Unrealzilla/Private/BugMarkerLoader.cpp index be85c36..022a0f4 100644 --- a/Source/Unrealzilla/Private/BugMarkerLoader.cpp +++ b/Source/Unrealzilla/Private/BugMarkerLoader.cpp @@ -107,22 +107,8 @@ void ABugMarkerLoader::LoadNewBatch() FActorSpawnParameters SpawnParams; SpawnParams.Owner = this; const FTransform Transform = FTransform(FRotationMatrix::MakeFromZ(UpVector).Rotator(), Location, FVector::OneVector); - ABugMarkerActor *Marker = this->GetWorld()->SpawnActorDeferred(Class, Transform, this); - Marker->SetBugID(BugData.id); - Marker->SetBugSummary(BugData.summary); - if (GetDefault()->UnresolvedStatuses.Contains(BugData.status)) - { - Marker->SetBugStatus(EBugStatus::Unresolved); - } - else if (GetDefault()->InProgressStatuses.Contains(BugData.status)) - { - Marker->SetBugStatus(EBugStatus::InProgress); - } - else if (GetDefault()->ResolvedStatuses.Contains(BugData.status)) - { - Marker->SetBugStatus(EBugStatus::Resolved); - } - Marker->FinishSpawning(Transform); + ABugMarkerActor *Marker = this->GetWorld()->SpawnActor(Class, Transform, SpawnParams); + Marker->SetBugData(BugData); this->Markers.Add(Marker); this->BugBatch.RemoveAt(0); diff --git a/Source/Unrealzilla/Private/BugPlacerPawn.cpp b/Source/Unrealzilla/Private/BugPlacerPawn.cpp index f10da6c..d8e03d8 100644 --- a/Source/Unrealzilla/Private/BugPlacerPawn.cpp +++ b/Source/Unrealzilla/Private/BugPlacerPawn.cpp @@ -6,6 +6,7 @@ #include "BugMarkerLoader.h" #include "ExitingBugPlacementScreen.h" #include "UnrealzillaGlobalSettings.h" +#include "UnrealzillaJSON.h" #include "Components/MaterialBillboardComponent.h" #include "Components/SphereComponent.h" @@ -78,28 +79,51 @@ void ABugPlacerPawn::TraceTimerElapsed() FCollisionQueryParams Params; Params.bTraceComplex = false; + Params.bIgnoreTouches = false; Params.AddIgnoredActor(this); FHitResult TraceHit; - const FVector TraceStart = this->TraceOriginComponent->GetComponentLocation(); - const FVector TraceEnd = TraceStart + (this->TraceOriginComponent->GetForwardVector() * GetDefault()->BugPlacementTraceDistance); + const FVector TraceStart = this->GetActorLocation(); + const FVector TraceEnd = TraceStart + (this->GetActorForwardVector() * GetDefault()->BugPlacementTraceDistance); this->bCurrentTraceHit = World->LineTraceSingleByChannel(TraceHit, TraceStart, TraceEnd, ECollisionChannel::ECC_Visibility, Params); // Move bug marker to the current pointer position, or behind // the camera if the pointer is not currently hitting a surface. if (this->bCurrentTraceHit) { - this->PlacementMarkerRoot->SetWorldLocationAndRotation(TraceHit.ImpactPoint, FRotationMatrix::MakeFromZ(TraceHit.ImpactNormal).ToQuat()); - this->PlacementMarkerRoot->SetVisibility(true, true); + if (ABugMarkerActor *Marker = Cast(TraceHit.GetActor())) + { + this->PlacementMarkerRoot->SetVisibility(true, false); + this->UpdateBugInformation(Marker->GetBugData()); + } + else + { + this->PlacementMarkerRoot->SetVisibility(true, true); + this->UpdateBugInformation(FJSONBugData()); + } - this->TraceOriginComponent->SetRelativeScale3D(FVector(1.0f, 1.0f, (TraceHit.ImpactPoint - TraceStart).Length())); + this->PlacementMarkerRoot->SetWorldLocationAndRotation(TraceHit.ImpactPoint, FRotationMatrix::MakeFromZ(TraceHit.ImpactNormal).ToQuat()); + + const FVector TraceOriginLocation = this->TraceOriginComponent->GetComponentLocation(); + FVector FacingVector = (TraceHit.ImpactPoint - TraceOriginLocation); + FacingVector.Normalize(); + const FRotator TraceOriginFacingRotation = FRotationMatrix::MakeFromX(FacingVector).Rotator(); + this->TraceOriginComponent->SetWorldRotation(TraceOriginFacingRotation); + const FVector TraceOriginScale = this->TraceOriginComponent->GetRelativeScale3D(); + this->TraceOriginComponent->SetRelativeScale3D(FVector(TraceOriginScale.X, TraceOriginScale.Y, (TraceHit.ImpactPoint - TraceOriginLocation).Length())); } else { this->PlacementMarkerRoot->SetRelativeLocationAndRotation(FVector::ZeroVector, FRotator::ZeroRotator); this->PlacementMarkerRoot->SetVisibility(false, true); - this->TraceOriginComponent->SetRelativeScale3D(FVector(1.0f, 1.0f, (TraceEnd - TraceStart).Length())); + const FVector TraceOriginLocation = this->TraceOriginComponent->GetComponentLocation(); + FVector FacingVector = (TraceEnd - TraceOriginLocation); + FacingVector.Normalize(); + const FRotator TraceOriginFacingRotation = FRotationMatrix::MakeFromX(FacingVector).Rotator(); + this->TraceOriginComponent->SetWorldRotation(TraceOriginFacingRotation); + const FVector TraceOriginScale = this->TraceOriginComponent->GetRelativeScale3D(); + this->TraceOriginComponent->SetRelativeScale3D(FVector(TraceOriginScale.X, TraceOriginScale.Y, (TraceEnd - TraceStart).Length())); } } } @@ -171,9 +195,8 @@ void ABugPlacerPawn::ExitCanceled() } -void ABugPlacerPawn::SpawnBugPlacerPawn(const UObject *WorldContextObject) +void ABugPlacerPawn::SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf Class) { - TSubclassOf Class = StaticLoadClass(ABugPlacerPawn::StaticClass(), nullptr, BUG_PLACER_PAWN_BP); const FTransform &Transform = UGameplayStatics::GetPlayerCameraManager(WorldContextObject, 0)->GetActorTransform(); FActorSpawnParameters SpawnParams; SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; diff --git a/Source/Unrealzilla/Private/BugSubmissionForm.cpp b/Source/Unrealzilla/Private/BugSubmissionForm.cpp index c0a69c9..cdcf5e6 100644 --- a/Source/Unrealzilla/Private/BugSubmissionForm.cpp +++ b/Source/Unrealzilla/Private/BugSubmissionForm.cpp @@ -9,6 +9,7 @@ #include "HttpModule.h" #include "JsonObjectConverter.h" #include "UnrealzillaGlobalSettings.h" +#include "UnrealzillaJSON.h" #include "Components/CircularThrobber.h" #include "Components/Overlay.h" @@ -251,6 +252,68 @@ void UBugSubmissionForm::ServerPOSTResponse(FHttpRequestPtr Request, FHttpRespon } else { + const FString FullURL = GetDefault()->SubmissionServer + "/rest.cgi"; + + TArray StatusQueries; + StatusQueries.Add("id=" + FString::FromInt(ResponseData.id)); + if (GetDefault()->bShowUnresolvedBugs) + { + for (const FString Unresolved : GetDefault()->UnresolvedStatuses) + { + StatusQueries.Add("status=" + Unresolved); + } + } + if (GetDefault()->bShowInProgressBugs) + { + for (const FString InProgress : GetDefault()->InProgressStatuses) + { + StatusQueries.Add("status=" + InProgress); + } + } + if (GetDefault()->bShowResolvedBugs) + { + for (const FString Resolved : GetDefault()->ResolvedStatuses) + { + StatusQueries.Add("status=" + Resolved); + } + } + StatusQueries.Add("cf_mapname=" + this->GetWorld()->GetMapName().RightChop(this->GetWorld()->StreamingLevelsPrefix.Len())); + StatusQueries.Add("api_key=" + GetDefault()->APIKey); + const FString QueryString = FString::Join(StatusQueries, TEXT("&")); + + FHttpModule &HttpModule = FHttpModule::Get(); + TSharedRef SeverityRequest = HttpModule.CreateRequest(); + SeverityRequest->SetVerb(TEXT("GET")); + SeverityRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json")); + SeverityRequest->SetURL(FullURL + "/bug" + "?" + QueryString); + SeverityRequest->OnProcessRequestComplete().BindUObject(this, &UBugSubmissionForm::ServerPOSTUpdateMarkerResponse); + SeverityRequest->ProcessRequest(); + } + } + else + { + this->ServerConnectionError(Request->GetStatus()); + } +} + +void UBugSubmissionForm::ServerPOSTUpdateMarkerResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success) +{ + if (Success) + { + FJSONBugResponse ResponseData; + FString JSONResponse = Response->GetContentAsString(); + FJsonObjectConverter::JsonObjectStringToUStruct(JSONResponse, &ResponseData); + + if (ResponseData.error) + { + this->ShowProcessingOverlayMessage(ResponseData.message); + } + else + { + if (!ResponseData.bugs.IsEmpty()) + { + this->BugMarkerActor->SetBugData(ResponseData.bugs[0]); + } this->CloseForm(); } } diff --git a/Source/Unrealzilla/Public/BugMarkerActor.h b/Source/Unrealzilla/Public/BugMarkerActor.h index 0461467..fac7a2a 100644 --- a/Source/Unrealzilla/Public/BugMarkerActor.h +++ b/Source/Unrealzilla/Public/BugMarkerActor.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "UnrealzillaJSON.h" #include "BugMarkerActor.generated.h" @@ -12,6 +13,7 @@ UENUM() enum class EBugStatus : uint8 { + NoStatus UMETA(DisplayName="No Status"), Unresolved UMETA(DisplayName="Unresolved"), InProgress UMETA(DisplayName="In Progress"), Resolved UMETA(DisplayName="Resolved"), @@ -24,15 +26,18 @@ class UNREALZILLA_API ABugMarkerActor : public AActor GENERATED_BODY() public: + UFUNCTION(BlueprintImplementableEvent) + void ReloadBugData(); UFUNCTION(BlueprintImplementableEvent) void LoadBugSubmissionForm(); - void SetBugID(const uint32 &ID) { this->BugID = ID; } - void SetBugSummary(const FString &Summary) { this->BugSummary = Summary; } - void SetBugStatus(const EBugStatus &Status) { this->BugStatus = Status; } + UFUNCTION(BlueprintCallable) + void SetBugData(const FJSONBugData &Data) { this->BugData = Data; this->ReloadBugData(); } + UFUNCTION(BlueprintPure) + FJSONBugData GetBugData() const { return this->BugData; } + UFUNCTION(BlueprintPure) + EBugStatus GetBugStatus() const; -private: - uint32 BugID = 0; - FString BugSummary; - EBugStatus BugStatus; +protected: + FJSONBugData BugData; }; diff --git a/Source/Unrealzilla/Public/BugMarkerLoader.h b/Source/Unrealzilla/Public/BugMarkerLoader.h index 5e8c288..b6fad08 100644 --- a/Source/Unrealzilla/Public/BugMarkerLoader.h +++ b/Source/Unrealzilla/Public/BugMarkerLoader.h @@ -4,67 +4,13 @@ #include "CoreMinimal.h" +#include "UnrealzillaJSON.h" #include "Interfaces/IHttpRequest.h" #include "Interfaces/IHttpResponse.h" #include "BugMarkerLoader.generated.h" -/** -* JSON structs for bug lists -*/ -USTRUCT(Blueprintable) -struct FJSONBugData -{ - GENERATED_BODY() -public: - UPROPERTY() - int32 id = -1; - UPROPERTY() - FString summary; - UPROPERTY() - FString component; - UPROPERTY() - FString cf_mapname; - UPROPERTY() - FString cf_location; - UPROPERTY() - FString platform; - UPROPERTY() - FString op_sys; - UPROPERTY() - bool is_open = true; - UPROPERTY() - FString severity; - UPROPERTY() - FString status; - UPROPERTY() - FString resolution; - UPROPERTY() - int32 dupe_of = -1; -}; - -USTRUCT(Blueprintable) -struct FJSONBugResponse -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - TArray bugs; - UPROPERTY(BlueprintReadOnly) - bool error = false; - UPROPERTY(BlueprintReadOnly) - int32 code = -1; - UPROPERTY(BlueprintReadOnly) - FString message; - UPROPERTY(BlueprintReadOnly) - FString documentation; -}; -/** -* END JSON structs for bug lists -*/ - - UCLASS() class UNREALZILLA_API ABugMarkerLoader : public AActor { diff --git a/Source/Unrealzilla/Public/BugPlacerPawn.h b/Source/Unrealzilla/Public/BugPlacerPawn.h index d7e6080..e626f0f 100644 --- a/Source/Unrealzilla/Public/BugPlacerPawn.h +++ b/Source/Unrealzilla/Public/BugPlacerPawn.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "UnrealzillaJSON.h" #include "GameFramework/Pawn.h" #include "BugPlacerPawn.generated.h" @@ -22,16 +23,16 @@ public: UFUNCTION(BlueprintCallable) void Activate(); - UFUNCTION(BlueprintCallable) void Deactivate(); - UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject")) - static void SpawnBugPlacerPawn(const UObject *WorldContextObject); + UFUNCTION(BlueprintImplementableEvent) + void UpdateBugInformation(const FJSONBugData &BugData); + UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject")) + static void SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf Class); UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject")) static void ShowBugMarkersInLevel(const UObject *WorldContextObject); - UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject")) static void HideBugMarkersInLevel(const UObject *WorldContextObject); diff --git a/Source/Unrealzilla/Public/BugSubmissionForm.h b/Source/Unrealzilla/Public/BugSubmissionForm.h index d294f05..76ad1a7 100644 --- a/Source/Unrealzilla/Public/BugSubmissionForm.h +++ b/Source/Unrealzilla/Public/BugSubmissionForm.h @@ -6,231 +6,13 @@ #include "BugFormButton.h" #include "CommonActivatableWidget.h" +#include "UnrealzillaJSON.h" #include "Interfaces/IHttpRequest.h" #include "Interfaces/IHttpResponse.h" #include "BugSubmissionForm.generated.h" -/** -* JSON structs for POST -*/ -USTRUCT() -struct FJSONPostBug -{ - GENERATED_BODY() -public: - UPROPERTY() - FString product; - UPROPERTY() - FString version; - UPROPERTY() - FString platform; - UPROPERTY() - FString op_sys; - UPROPERTY() - FString component; - UPROPERTY() - FString severity; - UPROPERTY() - FString cf_mapname; - UPROPERTY() - FString cf_location; - UPROPERTY() - FString summary; - UPROPERTY() - FString description; - UPROPERTY() - FString status; -}; - -USTRUCT(Blueprintable) -struct FJSONPostResponse -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - int32 id = -1; - UPROPERTY(BlueprintReadOnly) - bool error = false; - UPROPERTY(BlueprintReadOnly) - int32 code = -1; - UPROPERTY(BlueprintReadOnly) - FString message; - UPROPERTY(BlueprintReadOnly) - FString documentation; -}; -/** -* END JSON structs for POST -*/ - - -///** -// * JSON structs for bug lists -// */ -//USTRUCT(Blueprintable) -//struct FJSONBugData -//{ -// GENERATED_BODY() -//public: -// UPROPERTY() -// FString component; -// UPROPERTY() -// FString cf_mapname; -// UPROPERTY() -// FString cf_location; -//}; -// -//USTRUCT(Blueprintable) -//struct FJSONBugResponse -//{ -// GENERATED_BODY() -//public: -// UPROPERTY(BlueprintReadOnly) -// TArray bugs; -// UPROPERTY(BlueprintReadOnly) -// bool error = false; -// UPROPERTY(BlueprintReadOnly) -// int32 code = -1; -// UPROPERTY(BlueprintReadOnly) -// FString message; -// UPROPERTY(BlueprintReadOnly) -// FString documentation; -//}; -///** -// * END JSON structs for bug lists -// */ - - -/** - * JSON structs for product data - */ -USTRUCT(Blueprintable) -struct FJSONComponentData -{ - GENERATED_BODY() -public: - UPROPERTY() - int32 id = -1; - UPROPERTY() - bool is_active = false; - UPROPERTY() - FString name; - UPROPERTY() - FString description; - UPROPERTY() - FString default_assigned_to; - UPROPERTY() - int32 sort_key = -1; -}; - -USTRUCT(Blueprintable) -struct FJSONVersionData -{ - GENERATED_BODY() -public: - UPROPERTY() - int32 id = -1; - UPROPERTY() - bool is_active = false; - UPROPERTY() - FString name; - UPROPERTY() - int32 sort_key = -1; -}; - -USTRUCT(Blueprintable) -struct FJSONProductData -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - FString name; - UPROPERTY(BlueprintReadOnly) - FString classification; - UPROPERTY(BlueprintReadOnly) - FString description; - UPROPERTY(BlueprintReadOnly) - TArray components; - UPROPERTY(BlueprintReadOnly) - TArray versions; -}; - -USTRUCT(Blueprintable) -struct FJSONProductResponse -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - TArray products; - - UPROPERTY(BlueprintReadOnly) - bool error = false; - UPROPERTY(BlueprintReadOnly) - int32 code = -1; - UPROPERTY(BlueprintReadOnly) - FString message; - UPROPERTY(BlueprintReadOnly) - FString documentation; -}; -/** -* END JSON structs for product data -*/ - - -/** - * JSON structs for product data - */ -USTRUCT(Blueprintable) -struct FJSONFieldValueData -{ - GENERATED_BODY() -public: - UPROPERTY() - FString name; - UPROPERTY() - int32 sort_key = -1; -}; - -USTRUCT(Blueprintable) -struct FJSONFieldData -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - int32 id = -1; - UPROPERTY(BlueprintReadOnly) - FString name; - UPROPERTY(BlueprintReadOnly) - FString display_name; - UPROPERTY(BlueprintReadOnly) - bool is_mandatory = false; - UPROPERTY(BlueprintReadOnly) - TArray values; -}; - -USTRUCT(Blueprintable) -struct FJSONFieldResponse -{ - GENERATED_BODY() -public: - UPROPERTY(BlueprintReadOnly) - TArray fields; - - UPROPERTY(BlueprintReadOnly) - bool error = false; - UPROPERTY(BlueprintReadOnly) - int32 code = -1; - UPROPERTY(BlueprintReadOnly) - FString message; - UPROPERTY(BlueprintReadOnly) - FString documentation; -}; -/** -* END JSON structs for product data -*/ - - UCLASS() class UNREALZILLA_API UBugSubmissionForm : public UCommonActivatableWidget { @@ -298,6 +80,7 @@ protected: private: void ServerPOSTResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success); + void ServerPOSTUpdateMarkerResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success); void ServerProductInfoResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success); void ServerSeverityInfoResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success); void ServerPlatformInfoResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool Success); diff --git a/Source/Unrealzilla/Public/UnrealzillaGlobalSettings.h b/Source/Unrealzilla/Public/UnrealzillaGlobalSettings.h index 15f91dc..0bb4d96 100644 --- a/Source/Unrealzilla/Public/UnrealzillaGlobalSettings.h +++ b/Source/Unrealzilla/Public/UnrealzillaGlobalSettings.h @@ -2,6 +2,7 @@ #pragma once +#include "BugPlacerPawn.h" #include "Engine/DeveloperSettingsBackedByCVars.h" #include "UnrealzillaGlobalSettings.generated.h" diff --git a/Source/Unrealzilla/Public/UnrealzillaJSON.h b/Source/Unrealzilla/Public/UnrealzillaJSON.h new file mode 100644 index 0000000..c032e1f --- /dev/null +++ b/Source/Unrealzilla/Public/UnrealzillaJSON.h @@ -0,0 +1,244 @@ +// ©2022 Batty Bovine Productions, LLC. All Rights Reserved. + +#pragma once + +#include "CoreMinimal.h" + +#include "UnrealzillaJSON.generated.h" + + +/** +* JSON structs for POST +*/ +USTRUCT() +struct FJSONPostBug +{ + GENERATED_BODY() +public: + UPROPERTY() + FString product; + UPROPERTY() + FString version; + UPROPERTY() + FString platform; + UPROPERTY() + FString op_sys; + UPROPERTY() + FString component; + UPROPERTY() + FString severity; + UPROPERTY() + FString cf_mapname; + UPROPERTY() + FString cf_location; + UPROPERTY() + FString summary; + UPROPERTY() + FString description; + UPROPERTY() + FString status; +}; + +USTRUCT(Blueprintable) +struct FJSONPostResponse +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + int32 id = -1; + UPROPERTY(BlueprintReadOnly) + bool error = false; + UPROPERTY(BlueprintReadOnly) + int32 code = -1; + UPROPERTY(BlueprintReadOnly) + FString message; + UPROPERTY(BlueprintReadOnly) + FString documentation; +}; +/** +* END JSON structs for POST +*/ + + +/** +* JSON structs for product data +*/ +USTRUCT(Blueprintable) +struct FJSONComponentData +{ + GENERATED_BODY() +public: + UPROPERTY() + int32 id = -1; + UPROPERTY() + bool is_active = false; + UPROPERTY() + FString name; + UPROPERTY() + FString description; + UPROPERTY() + FString default_assigned_to; + UPROPERTY() + int32 sort_key = -1; +}; + +USTRUCT(Blueprintable) +struct FJSONVersionData +{ + GENERATED_BODY() +public: + UPROPERTY() + int32 id = -1; + UPROPERTY() + bool is_active = false; + UPROPERTY() + FString name; + UPROPERTY() + int32 sort_key = -1; +}; + +USTRUCT(Blueprintable) +struct FJSONProductData +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + FString name; + UPROPERTY(BlueprintReadOnly) + FString classification; + UPROPERTY(BlueprintReadOnly) + FString description; + UPROPERTY(BlueprintReadOnly) + TArray components; + UPROPERTY(BlueprintReadOnly) + TArray versions; +}; + +USTRUCT(Blueprintable) +struct FJSONProductResponse +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + TArray products; + + UPROPERTY(BlueprintReadOnly) + bool error = false; + UPROPERTY(BlueprintReadOnly) + int32 code = -1; + UPROPERTY(BlueprintReadOnly) + FString message; + UPROPERTY(BlueprintReadOnly) + FString documentation; +}; +/** +* END JSON structs for product data +*/ + + +/** +* JSON structs for product data +*/ +USTRUCT(Blueprintable) +struct FJSONFieldValueData +{ + GENERATED_BODY() +public: + UPROPERTY() + FString name; + UPROPERTY() + int32 sort_key = -1; +}; + +USTRUCT(Blueprintable) +struct FJSONFieldData +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + int32 id = -1; + UPROPERTY(BlueprintReadOnly) + FString name; + UPROPERTY(BlueprintReadOnly) + FString display_name; + UPROPERTY(BlueprintReadOnly) + bool is_mandatory = false; + UPROPERTY(BlueprintReadOnly) + TArray values; +}; + +USTRUCT(Blueprintable) +struct FJSONFieldResponse +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + TArray fields; + + UPROPERTY(BlueprintReadOnly) + bool error = false; + UPROPERTY(BlueprintReadOnly) + int32 code = -1; + UPROPERTY(BlueprintReadOnly) + FString message; + UPROPERTY(BlueprintReadOnly) + FString documentation; +}; +/** +* END JSON structs for product data +*/ + + +/** +* JSON structs for bug lists +*/ +USTRUCT(Blueprintable) +struct FJSONBugData +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + int32 id = -1; + UPROPERTY(BlueprintReadOnly) + FString summary; + UPROPERTY(BlueprintReadOnly) + FString component; + UPROPERTY(BlueprintReadOnly) + FString cf_mapname; + UPROPERTY(BlueprintReadOnly) + FString cf_location; + UPROPERTY(BlueprintReadOnly) + FString platform; + UPROPERTY(BlueprintReadOnly) + FString op_sys; + UPROPERTY(BlueprintReadOnly) + bool is_open = true; + UPROPERTY(BlueprintReadOnly) + FString severity; + UPROPERTY(BlueprintReadOnly) + FString status; + UPROPERTY(BlueprintReadOnly) + FString resolution; + UPROPERTY(BlueprintReadOnly) + int32 dupe_of = -1; +}; + +USTRUCT(Blueprintable) +struct FJSONBugResponse +{ + GENERATED_BODY() +public: + UPROPERTY(BlueprintReadOnly) + TArray bugs; + UPROPERTY(BlueprintReadOnly) + bool error = false; + UPROPERTY(BlueprintReadOnly) + int32 code = -1; + UPROPERTY(BlueprintReadOnly) + FString message; + UPROPERTY(BlueprintReadOnly) + FString documentation; +}; +/** +* END JSON structs for bug lists +*/