Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetAudienceByIdResponseContent(
PrepareGetAudienceByIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id);
id: id!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ partial void ProcessDeleteDocumentByIdResponse(
PrepareDeleteDocumentByIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
documentId: documentId);
documentId: documentId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetDocumentByIdResponseContent(
PrepareGetDocumentByIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
documentId: documentId);
documentId: documentId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateDocumentResponseContent(
PrepareUpdateDocumentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
documentId: documentId,
documentId: documentId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ partial void ProcessDeleteKnowledgeDocumentResponse(
PrepareDeleteKnowledgeDocumentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
knowledgeId: knowledgeId);
knowledgeId: knowledgeId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent(
PrepareGetKnowledgeDocumentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
knowledgeId: knowledgeId);
knowledgeId: knowledgeId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent(
PrepareUpdateKnowledgeDocumentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
knowledgeId: knowledgeId,
knowledgeId: knowledgeId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,37 @@ partial void ProcessUploadKnowledgeDocumentResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Name}"),
content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty),
name: "\"name\"");
var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -134,21 +162,21 @@ partial void ProcessUploadKnowledgeDocumentResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Metadata}"),
content: new global::System.Net.Http.StringContent(request.Metadata ?? string.Empty),
name: "\"metadata\"");
}
if (request.Settings != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Settings}"),
content: new global::System.Net.Http.StringContent(request.Settings ?? string.Empty),
name: "\"settings\"");
}
if (request.Summary != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Summary}"),
content: new global::System.Net.Http.StringContent(request.Summary ?? string.Empty),
name: "\"summary\"");
}
if (request.Tags != default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetStyleByIdResponseContent(
PrepareGetStyleByIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
styleId: styleId);
styleId: styleId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ partial void ProcessGetTaskByIdResponseContent(
PrepareGetTaskByIdRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id,
id: id!,
version: version);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessRunTaskResponseContent(
PrepareRunTaskRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id,
id: id!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetUserResponseContent(
PrepareGetUserRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
userId: userId);
userId: userId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ partial void ProcessDeleteToneResponse(
PrepareDeleteToneRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
toneId: toneId);
toneId: toneId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetToneResponseContent(
PrepareGetToneRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
toneId: toneId);
toneId: toneId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateToneResponseContent(
PrepareUpdateToneRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
toneId: toneId,
toneId: toneId!,
request: request);

return __httpRequest;
Expand Down