text:
/**
 * Swaggy Jenkins
 * Jenkins API clients generated from Swagger / Open API specification
 *
 * OpenAPI spec version: 1.5.1-pre.0
 * Contact: blah@cliffano.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * https://github.com/OpenAPITools/openapi-generator
 * Do not edit the class manually.
 */

#include "OpenAPIBlueOceanApiOperations.h"

#include "OpenAPIModule.h"
#include "OpenAPIHelpers.h"

#include "Dom/JsonObject.h"
#include "Templates/SharedPointer.h"
#include "HttpModule.h"
#include "PlatformHttp.h"

namespace OpenAPI
{

FString OpenAPIBlueOceanApi::DeletePipelineQueueItemRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("queue"), ToStringFormatArg(Queue) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue/{queue}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::DeletePipelineQueueItemRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = {  };

	HttpRequest->SetVerb(TEXT("DELETE"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::DeletePipelineQueueItemResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully deleted queue item"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::DeletePipelineQueueItemResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return true;
}

FString OpenAPIBlueOceanApi::GetAuthenticatedUserRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/user/"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetAuthenticatedUserRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetAuthenticatedUserResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved authenticated user details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetAuthenticatedUserResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetClassesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("class"), ToStringFormatArg(_Class) } };

	FString Path = FString::Format(TEXT("/blue/rest/classes/{class}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetClassesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetClassesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved class names"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetClassesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetJsonWebKeyRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("key"), ToStringFormatArg(Key) } };

	FString Path = FString::Format(TEXT("/jwt-auth/jwks/{key}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetJsonWebKeyRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetJsonWebKeyResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved JWT token"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetJsonWebKeyResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetJsonWebTokenRequest::ComputePath() const
{
	FString Path(TEXT("/jwt-auth/token"));
	TArray<FString> QueryParams;
	if(ExpiryTimeInMins.IsSet())
	{
		QueryParams.Add(FString(TEXT("expiryTimeInMins=")) + ToUrlString(ExpiryTimeInMins.GetValue()));
	}
	if(MaxExpiryTimeInMins.IsSet())
	{
		QueryParams.Add(FString(TEXT("maxExpiryTimeInMins=")) + ToUrlString(MaxExpiryTimeInMins.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::GetJsonWebTokenRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetJsonWebTokenResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved JWT token"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetJsonWebTokenResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetOrganisationRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetOrganisationRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetOrganisationResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipeline details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	case 404:
		SetResponseString(TEXT("Pipeline cannot be found on Jenkins instance"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetOrganisationResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetOrganisationsRequest::ComputePath() const
{
	FString Path(TEXT("/blue/rest/organizations/"));
	return Path;
}

void OpenAPIBlueOceanApi::GetOrganisationsRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetOrganisationsResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipelines details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetOrganisationsResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipeline details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	case 404:
		SetResponseString(TEXT("Pipeline cannot be found on Jenkins instance"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineActivitiesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/activities"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineActivitiesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineActivitiesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved all activities details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineActivitiesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineBranchRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("branch"), ToStringFormatArg(Branch) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineBranchRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineBranchResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved branch details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineBranchResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineBranchRunRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("branch"), ToStringFormatArg(Branch) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/runs/{run}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineBranchRunRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineBranchRunResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineBranchRunResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineBranchesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineBranchesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineBranchesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved all branches details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineBranchesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineFolderRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("folder"), ToStringFormatArg(Folder) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{folder}/"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineFolderRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineFolderResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved folder details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineFolderResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineFolderPipelineRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("folder"), ToStringFormatArg(Folder) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{folder}/pipelines/{pipeline}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineFolderPipelineRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineFolderPipelineResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipeline details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineFolderPipelineResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineQueueRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineQueueRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineQueueResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved queue details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineQueueResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunLogRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log"), PathParams);

	TArray<FString> QueryParams;
	if(Start.IsSet())
	{
		QueryParams.Add(FString(TEXT("start=")) + ToUrlString(Start.GetValue()));
	}
	if(Download.IsSet())
	{
		QueryParams.Add(FString(TEXT("download=")) + ToUrlString(Download.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunLogRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunLogResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipeline run log"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunLogResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunNodeRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) },
	{ TEXT("node"), ToStringFormatArg(Node) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run node details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunNodeResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunNodeStepRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) },
	{ TEXT("node"), ToStringFormatArg(Node) },
	{ TEXT("step"), ToStringFormatArg(Step) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run node step details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunNodeStepResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunNodeStepLogRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) },
	{ TEXT("node"), ToStringFormatArg(Node) },
	{ TEXT("step"), ToStringFormatArg(Step) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepLogRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepLogResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipeline run node step log"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunNodeStepLogResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunNodeStepsRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) },
	{ TEXT("node"), ToStringFormatArg(Node) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepsRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunNodeStepsResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run node steps details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunNodeStepsResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunNodesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunNodesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunNodesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved run nodes details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunNodesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelineRunsRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelineRunsRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelineRunsResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved runs details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelineRunsResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetPipelinesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetPipelinesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetPipelinesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved pipelines details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetPipelinesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetSCMRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("scm"), ToStringFormatArg(Scm) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/scm/{scm}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetSCMRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetSCMResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved SCM details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetSCMResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetSCMOrganisationRepositoriesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("scm"), ToStringFormatArg(Scm) },
	{ TEXT("scmOrganisation"), ToStringFormatArg(ScmOrganisation) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories"), PathParams);

	TArray<FString> QueryParams;
	if(CredentialId.IsSet())
	{
		QueryParams.Add(FString(TEXT("credentialId=")) + ToUrlString(CredentialId.GetValue()));
	}
	if(PageSize.IsSet())
	{
		QueryParams.Add(FString(TEXT("pageSize=")) + ToUrlString(PageSize.GetValue()));
	}
	if(PageNumber.IsSet())
	{
		QueryParams.Add(FString(TEXT("pageNumber=")) + ToUrlString(PageNumber.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::GetSCMOrganisationRepositoriesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetSCMOrganisationRepositoriesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved SCM organization repositories details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetSCMOrganisationRepositoriesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetSCMOrganisationRepositoryRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("scm"), ToStringFormatArg(Scm) },
	{ TEXT("scmOrganisation"), ToStringFormatArg(ScmOrganisation) },
	{ TEXT("repository"), ToStringFormatArg(Repository) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories/{repository}"), PathParams);

	TArray<FString> QueryParams;
	if(CredentialId.IsSet())
	{
		QueryParams.Add(FString(TEXT("credentialId=")) + ToUrlString(CredentialId.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::GetSCMOrganisationRepositoryRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetSCMOrganisationRepositoryResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved SCM organizations details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetSCMOrganisationRepositoryResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetSCMOrganisationsRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("scm"), ToStringFormatArg(Scm) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/scm/{scm}/organizations"), PathParams);

	TArray<FString> QueryParams;
	if(CredentialId.IsSet())
	{
		QueryParams.Add(FString(TEXT("credentialId=")) + ToUrlString(CredentialId.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::GetSCMOrganisationsRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetSCMOrganisationsResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved SCM organizations details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetSCMOrganisationsResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetUserRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("user"), ToStringFormatArg(User) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/users/{user}"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetUserRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetUserResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved users details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetUserResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetUserFavoritesRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("user"), ToStringFormatArg(User) } };

	FString Path = FString::Format(TEXT("/blue/rest/users/{user}/favorites"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetUserFavoritesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetUserFavoritesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved users favorites details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetUserFavoritesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::GetUsersRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/users/"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::GetUsersRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::GetUsersResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved users details"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::GetUsersResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::PostPipelineRunRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::PostPipelineRunRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("POST"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::PostPipelineRunResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully replayed a pipeline run"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::PostPipelineRunResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::PostPipelineRunsRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::PostPipelineRunsRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("POST"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::PostPipelineRunsResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully started a build"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::PostPipelineRunsResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::PutPipelineFavoriteRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/favorite"), PathParams);

	return Path;
}

void OpenAPIBlueOceanApi::PutPipelineFavoriteRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = { TEXT("application/json") };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("PUT"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Body parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);

		WriteJsonValue(Writer, Body);
		Writer->Close();

		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Body parameter (body) was ignored, not supported in multipart form"));
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Body parameter (body) was ignored, not supported in urlencoded requests"));
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::PutPipelineFavoriteResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully favorited/unfavorited a pipeline"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::PutPipelineFavoriteResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::PutPipelineRunRequest::ComputePath() const
{
	TMap<FString, FStringFormatArg> PathParams = {
	{ TEXT("organization"), ToStringFormatArg(Organization) },
	{ TEXT("pipeline"), ToStringFormatArg(Pipeline) },
	{ TEXT("run"), ToStringFormatArg(Run) } };

	FString Path = FString::Format(TEXT("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/stop"), PathParams);

	TArray<FString> QueryParams;
	if(Blocking.IsSet())
	{
		QueryParams.Add(FString(TEXT("blocking=")) + ToUrlString(Blocking.GetValue()));
	}
	if(TimeOutInSecs.IsSet())
	{
		QueryParams.Add(FString(TEXT("timeOutInSecs=")) + ToUrlString(TimeOutInSecs.GetValue()));
	}
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::PutPipelineRunRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("PUT"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::PutPipelineRunResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully stopped a build"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::PutPipelineRunResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::SearchRequest::ComputePath() const
{
	FString Path(TEXT("/blue/rest/search/"));
	TArray<FString> QueryParams;
	QueryParams.Add(FString(TEXT("q=")) + ToUrlString(Q));
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::SearchRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::SearchResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved search result"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::SearchResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

FString OpenAPIBlueOceanApi::SearchClassesRequest::ComputePath() const
{
	FString Path(TEXT("/blue/rest/classes/"));
	TArray<FString> QueryParams;
	QueryParams.Add(FString(TEXT("q=")) + ToUrlString(Q));
	Path += TCHAR('?');
	Path += FString::Join(QueryParams, TEXT("&"));

	return Path;
}

void OpenAPIBlueOceanApi::SearchClassesRequest::SetupHttpRequest(const FHttpRequestRef& HttpRequest) const
{
	static const TArray<FString> Consumes = {  };
	//static const TArray<FString> Produces = { TEXT("application/json") };

	HttpRequest->SetVerb(TEXT("GET"));

	// Default to Json Body request
	if (Consumes.Num() == 0 || Consumes.Contains(TEXT("application/json")))
	{
		// Form parameters
		FString JsonBody;
		JsonWriter Writer = TJsonWriterFactory<>::Create(&JsonBody);
		Writer->WriteObjectStart();
		Writer->WriteObjectEnd();
		Writer->Close();
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json; charset=utf-8"));
		HttpRequest->SetContentAsString(JsonBody);
	}
	else if (Consumes.Contains(TEXT("multipart/form-data")))
	{
	}
	else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded")))
	{
	}
	else
	{
		UE_LOG(LogOpenAPI, Error, TEXT("Request ContentType not supported (%s)"), *FString::Join(Consumes, TEXT(",")));
	}
}

void OpenAPIBlueOceanApi::SearchClassesResponse::SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode)
{
	Response::SetHttpResponseCode(InHttpResponseCode);
	switch ((int)InHttpResponseCode)
	{
	case 200:
		SetResponseString(TEXT("Successfully retrieved search result"));
		break;
	case 401:
		SetResponseString(TEXT("Authentication failed - incorrect username and/or password"));
		break;
	case 403:
		SetResponseString(TEXT("Jenkins requires authentication - please set username and password"));
		break;
	}
}

bool OpenAPIBlueOceanApi::SearchClassesResponse::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
{
	return TryGetJsonValue(JsonValue, Content);
}

}


text:
package com.evolveum.midpoint.repo.sql.data.common.id;

import java.io.Serializable;

/**
 * @author lazyman
 */
public class RAExtLongId implements Serializable {

    private String ownerOid;
    private Short ownerId;
    private Long value;
    private String name;

    public String getOwnerOid() {
        return ownerOid;
    }

    public void setOwnerOid(String ownerOid) {
        this.ownerOid = ownerOid;
    }

    public Short getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Short ownerId) {
        this.ownerId = ownerId;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RAExtLongId raLongId = (RAExtLongId) o;

        if (name != null ? !name.equals(raLongId.name) : raLongId.name != null) return false;
        if (ownerId != null ? !ownerId.equals(raLongId.ownerId) : raLongId.ownerId != null) return false;
        if (ownerOid != null ? !ownerOid.equals(raLongId.ownerOid) : raLongId.ownerOid != null) return false;
        if (value != null ? !value.equals(raLongId.value) : raLongId.value != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ownerOid != null ? ownerOid.hashCode() : 0;
        result = 31 * result + (ownerId != null ? ownerId.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "RALongId{" +
                "ownerOid='" + ownerOid + '\'' +
                ", ownerId=" + ownerId +
                ", value=" + value +
                '}';
    }
}

redpajama_set_name: RedPajamaGithub


text:
package librarytest.mymodule.cameraandtrimdemo.cameraandtrimdemomodlue;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Environment;
import android.provider.MediaStore;
import android.util.Log;
import android.widget.Toast;

import java.io.File;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;

/**
 * Created by myourinsyo on 2014/08/08.
 */
public class FileManager {
    private static final String TAG = FileManager.class.getSimpleName();

    //名前を生成する(カメラで撮った写真)
    public static String createPhotoFileName(){
        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
            File app_dir = new File(Environment.getExternalStorageDirectory() + Constant.TEMP_PICTURE_DIR_NAME);
            if (!app_dir.exists()) {
                app_dir.mkdir();
            }
        }

        Calendar calendar = Calendar.getInstance();
        calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
        //2014-08-15 11-51-06のような名前は大丈夫そうです。
        //2014-08-15 11:51:06だと古い機種が落ちる可能性がある「:」禁止
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
        return simpleDateFormat.format(calendar.getTime()) + ".jpg";

    }

    //名前を生成する(トリミングした写真)
    public static String createCropPhotoFileName(){
        if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
            File app_dir = new File(Environment.getExternalStorageDirectory() + Constant.TEMP_PICTURE_DIR_NAME);
            if (!app_dir.exists()) {
                app_dir.mkdir();
            }
        }

        Calendar calendar = Calendar.getInstance();
        calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
        //2014-08-15 11-51-06のような名前は大丈夫そうです。
        //2014-08-15 11:51:06だと古い機種が落ちる可能性がある「:」禁止
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
        return "trim-" + simpleDateFormat.format(calendar.getTime()) + ".jpg";

    }

    //写真をフォルダに保存
    public static void saveToFolder(Uri _photoUri, Bitmap _bitmap) {
        deleteTempFile(_photoUri);

        // ファイル保存
        FileOutputStream fos;
        try {
            fos = new FileOutputStream(_photoUri.getPath(), true);
            _bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);

            fos.flush();
            fos.close();

        } catch (Exception e) {
            Log.e("Debug", e.getMessage());
        }

        _bitmap.recycle();
    }

    //フォルダから写真を削除
    public static void deleteTempFile(Uri _photoUri){
        File deleteFile = new File(_photoUri.getPath());

        if (deleteFile.exists()) {
            deleteFile.delete();
        }
    }

    //写真をギャラリーへ保存
    public static void saveToGallery(Uri _photoUri, Context context) {
        registAndroidDB(_photoUri.getPath(), context);
    }
    /**
     * アンドロイドのデータベースへ画像のパスを登録
     *
     * @param _path 登録するパス
     */
    public static void registAndroidDB(String _path,Context _context) {
        // アンドロイドのデータベースへ登録
        // (登録しないとギャラリーなどにすぐに反映されないため)
        ContentValues values = new ContentValues();
        ContentResolver contentResolver = _context.getContentResolver();
        values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
        values.put("_data", _path);
        contentResolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
    }

    private static SQLiteDatabase db;
    private static ContentValues values;
    private static Cursor cursor;

    //BitmapをBase64でデータベースに保存
    public static void saveImageToDB(String _bitmapToString,Context context) {
        //TO-DO
        //保存する際、データの大きさを確認して保存すべき。しないと、読み出しするとき、落ちる
        //それとも、保存できるデータのサイズを設定する?
        db = MyDBHelper.getInstance(context).getWritableDatabase();
        values = new ContentValues();
        values.put("base64", _bitmapToString);
        long result = db.insert(Constant.DB_TABLE_NAME, null, values);
        if (result < 0) {
            return;
        }

        Toast.makeText(context, "DBに保存しました", Toast.LENGTH_SHORT).show();
    }
    static List<String> base64Data;

    //データベースからBitmapを取得
    public static List<String> getImageFromDB(Context context) {
        db = MyDBHelper.getInstance(context).getReadableDatabase();
        cursor = db.query(Constant.DB_TABLE_NAME, null, null, null, null, null, null);
        base64Data = new ArrayList<String>();

        while(cursor.moveToNext()){
            base64Data.add(cursor.getString(1));
        }

        cursor.close();
        return base64Data;
    }

}