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 @@ -3,11 +3,11 @@

namespace Speechify
{
public partial class AssetsClient
public partial class FilesClient
{


private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteAssetSecurityRequirement0 =
private static readonly global::Speechify.EndPointSecurityRequirement s_DeleteSecurityRequirement0 =
new global::Speechify.EndPointSecurityRequirement
{
Authorizations = new global::Speechify.EndPointAuthorizationRequirement[]
Expand All @@ -21,51 +21,47 @@ public partial class AssetsClient
},
},
};
private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteAssetSecurityRequirements =
private static readonly global::Speechify.EndPointSecurityRequirement[] s_DeleteSecurityRequirements =
new global::Speechify.EndPointSecurityRequirement[]
{ s_DeleteAssetSecurityRequirement0,
{ s_DeleteSecurityRequirement0,
};
partial void PrepareDeleteAssetArguments(
partial void PrepareDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string storeId,
ref string assetId,
ref string fileId,
ref string? speechifyVersion);
partial void PrepareDeleteAssetRequest(
partial void PrepareDeleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string storeId,
string assetId,
string fileId,
string? speechifyVersion);
partial void ProcessDeleteAssetResponse(
partial void ProcessDeleteResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessDeleteAssetResponseContent(
partial void ProcessDeleteResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);

/// <summary>
/// Delete Asset<br/>
/// Delete an asset.<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// Delete File<br/>
/// Delete a file and its bytes. A run already holding it as an attachment<br/>
/// stops being able to read it.<br/>
/// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
/// <param name="assetId"></param>
/// <param name="fileId"></param>
/// <param name="speechifyVersion"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Speechify.ApiException"></exception>
public async global::System.Threading.Tasks.Task<string> DeleteAssetAsync(
string storeId,
string assetId,
public async global::System.Threading.Tasks.Task<string> DeleteAsync(
string fileId,
string? speechifyVersion = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await DeleteAssetAsResponseAsync(
storeId: storeId,
assetId: assetId,
var __response = await DeleteAsResponseAsync(
fileId: fileId,
speechifyVersion: speechifyVersion,
requestOptions: requestOptions,
cancellationToken: cancellationToken
Expand All @@ -74,36 +70,34 @@ partial void ProcessDeleteAssetResponseContent(
return __response.Body;
}
/// <summary>
/// Delete Asset<br/>
/// Delete an asset.<br/>
/// Dark launch: requires the `hosted_apis_access` entitlement (402 `hosted_apis_not_in_plan` otherwise).
/// Delete File<br/>
/// Delete a file and its bytes. A run already holding it as an attachment<br/>
/// stops being able to read it.<br/>
/// Dark launch: requires the `durable_runs_access` entitlement (402 `durable_runs_not_in_plan` otherwise).
/// </summary>
/// <param name="storeId"></param>
/// <param name="assetId"></param>
/// <param name="fileId"></param>
/// <param name="speechifyVersion"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Speechify.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Speechify.AutoSDKHttpResponse<string>> DeleteAssetAsResponseAsync(
string storeId,
string assetId,
public async global::System.Threading.Tasks.Task<global::Speechify.AutoSDKHttpResponse<string>> DeleteAsResponseAsync(
string fileId,
string? speechifyVersion = default,
global::Speechify.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareDeleteAssetArguments(
PrepareDeleteArguments(
httpClient: HttpClient,
storeId: ref storeId,
assetId: ref assetId,
fileId: ref fileId,
speechifyVersion: ref speechifyVersion);


var __authorizations = global::Speechify.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
securityRequirements: s_DeleteAssetSecurityRequirements,
operationName: "DeleteAssetAsync");
securityRequirements: s_DeleteSecurityRequirements,
operationName: "DeleteAsync");

using var __timeoutCancellationTokenSource = global::Speechify.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
Expand All @@ -123,7 +117,7 @@ partial void ProcessDeleteAssetResponseContent(
{

var __pathBuilder = new global::Speechify.PathBuilder(
path: $"/v1/stores/{storeId}/assets/{assetId}",
path: $"/v1/files/{fileId}",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::Speechify.AutoSDKRequestOptionsSupport.AppendQueryParameters(
Expand Down Expand Up @@ -168,11 +162,10 @@ partial void ProcessDeleteAssetResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
PrepareDeleteAssetRequest(
PrepareDeleteRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
storeId: storeId!,
assetId: assetId!,
fileId: fileId!,
speechifyVersion: speechifyVersion);

return __httpRequest;
Expand All @@ -190,9 +183,9 @@ partial void ProcessDeleteAssetResponseContent(
await global::Speechify.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAsset",
methodName: "DeleteAssetAsync",
pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"",
operationId: "Delete",
methodName: "DeleteAsync",
pathTemplate: "$\"/v1/files/{fileId}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
Expand Down Expand Up @@ -224,9 +217,9 @@ partial void ProcessDeleteAssetResponseContent(
await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAsset",
methodName: "DeleteAssetAsync",
pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"",
operationId: "Delete",
methodName: "DeleteAsync",
pathTemplate: "$\"/v1/files/{fileId}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
Expand Down Expand Up @@ -265,9 +258,9 @@ partial void ProcessDeleteAssetResponseContent(
await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAsset",
methodName: "DeleteAssetAsync",
pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"",
operationId: "Delete",
methodName: "DeleteAsync",
pathTemplate: "$\"/v1/files/{fileId}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
Expand Down Expand Up @@ -305,17 +298,17 @@ partial void ProcessDeleteAssetResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
ProcessDeleteAssetResponse(
ProcessDeleteResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
{
await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAsset",
methodName: "DeleteAssetAsync",
pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"",
operationId: "Delete",
methodName: "DeleteAsync",
pathTemplate: "$\"/v1/files/{fileId}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
Expand All @@ -335,9 +328,9 @@ partial void ProcessDeleteAssetResponseContent(
await global::Speechify.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Speechify.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAsset",
methodName: "DeleteAssetAsync",
pathTemplate: "$\"/v1/stores/{storeId}/assets/{assetId}\"",
operationId: "Delete",
methodName: "DeleteAsync",
pathTemplate: "$\"/v1/files/{fileId}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
Expand Down Expand Up @@ -513,7 +506,7 @@ partial void ProcessDeleteAssetResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
ProcessDeleteAssetResponseContent(
ProcessDeleteResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
Expand Down
Loading