Skip to content

Commit 3baf540

Browse files
committed
ci: regenerated with OpenAPI Doc 0.4.0 ., Speakeasy CLI 1.277.8
1 parent cfbab28 commit 3baf540

26 files changed

+361
-54
lines changed

.speakeasy/gen.lock

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
lockVersion: 2.0.0
22
id: f73d2126-985b-4d69-88ee-b7c69254d8bf
33
management:
4-
docChecksum: e87f7661ef116d09df25c842b1032981
4+
docChecksum: 1710218668d467d8f56c88d745bfdf80
55
docVersion: 0.4.0 .
6-
speakeasyVersion: 1.277.0
7-
generationVersion: 2.317.0
8-
releaseVersion: 5.5.0
9-
configChecksum: 4daefaf3e0bb29a0fc91e9bbded59249
6+
speakeasyVersion: 1.277.8
7+
generationVersion: 2.319.10
8+
releaseVersion: 5.5.1
9+
configChecksum: 95a2d0255e4222e8fcba33b5f5d4cb1a
1010
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-csharp.git
1111
repoSubDirectory: .
1212
published: true
1313
features:
1414
csharp:
15-
core: 3.8.0
15+
core: 3.8.3
1616
examples: 2.81.3
1717
globalSecurity: 2.83.4
1818
globalServerURLs: 2.82.3
@@ -114,6 +114,8 @@ generatedFiles:
114114
- SpeakeasySDK/Models/Operations/GetRevisionsResponse.cs
115115
- SpeakeasySDK/Models/Operations/GetTagsRequest.cs
116116
- SpeakeasySDK/Models/Operations/GetTagsResponse.cs
117+
- SpeakeasySDK/Models/Operations/PostTagsRequest.cs
118+
- SpeakeasySDK/Models/Operations/PostTagsResponse.cs
117119
- SpeakeasySDK/Models/Operations/PreflightResponse.cs
118120
- SpeakeasySDK/Models/Operations/GetAccessTokenRequest.cs
119121
- SpeakeasySDK/Models/Operations/GetAccessTokenResponse.cs
@@ -171,6 +173,7 @@ generatedFiles:
171173
- SpeakeasySDK/Models/Shared/Revision.cs
172174
- SpeakeasySDK/Models/Shared/GetTagsResponse.cs
173175
- SpeakeasySDK/Models/Shared/Tag.cs
176+
- SpeakeasySDK/Models/Shared/AddTags.cs
174177
- SpeakeasySDK/Models/Shared/PreflightToken.cs
175178
- SpeakeasySDK/Models/Shared/PreflightRequest.cs
176179
- SpeakeasySDK/Models/Shared/Claims.cs
@@ -264,6 +267,8 @@ generatedFiles:
264267
- docs/Models/Operations/GetRevisionsResponse.md
265268
- docs/Models/Operations/GetTagsRequest.md
266269
- docs/Models/Operations/GetTagsResponse.md
270+
- docs/Models/Operations/PostTagsRequest.md
271+
- docs/Models/Operations/PostTagsResponse.md
267272
- docs/Models/Operations/PreflightResponse.md
268273
- docs/Models/Operations/GetAccessTokenRequest.md
269274
- docs/Models/Operations/GetAccessTokenResponse.md
@@ -321,6 +326,7 @@ generatedFiles:
321326
- docs/Models/Shared/Revision.md
322327
- docs/Models/Shared/GetTagsResponse.md
323328
- docs/Models/Shared/Tag.md
329+
- docs/Models/Shared/AddTags.md
324330
- docs/Models/Shared/PreflightToken.md
325331
- docs/Models/Shared/PreflightRequest.md
326332
- docs/Models/Shared/Claims.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ var res = await sdk.Apis.GetApisAsync(req);
8282
* [GetNamespaces](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.
8383
* [GetRevisions](docs/sdks/artifacts/README.md#getrevisions)
8484
* [GetTags](docs/sdks/artifacts/README.md#gettags)
85+
* [PostTags](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision
8586
* [Preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints
8687

8788
### [Auth](docs/sdks/auth/README.md)

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,4 +588,14 @@ Based on:
588588
### Generated
589589
- [csharp v5.5.0] .
590590
### Releases
591-
- [NuGet v5.5.0] https://www.nuget.org/packages/SpeakeasySDK/5.5.0 - .
591+
- [NuGet v5.5.0] https://www.nuget.org/packages/SpeakeasySDK/5.5.0 - .
592+
593+
## 2024-05-03 00:03:39
594+
### Changes
595+
Based on:
596+
- OpenAPI Doc 0.4.0 . https://docs.speakeasyapi.dev/openapi.yaml
597+
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
598+
### Generated
599+
- [csharp v5.5.1] .
600+
### Releases
601+
- [NuGet v5.5.1] https://www.nuget.org/packages/SpeakeasySDK/5.5.1 - .

SpeakeasySDK/ApiEndpoints.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public class ApiEndpoints: IApiEndpoints
9898
{
9999
public SDKConfig SDKConfiguration { get; private set; }
100100
private const string _language = "csharp";
101-
private const string _sdkVersion = "5.5.0";
102-
private const string _sdkGenVersion = "2.317.0";
101+
private const string _sdkVersion = "5.5.1";
102+
private const string _sdkGenVersion = "2.319.10";
103103
private const string _openapiDocVersion = "0.4.0 .";
104-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
104+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
105105
private string _serverUrl = "";
106106
private ISpeakeasyHttpClient _defaultClient;
107107
private Func<Security>? _securitySource;

SpeakeasySDK/Apis.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public class Apis: IApis
9494
{
9595
public SDKConfig SDKConfiguration { get; private set; }
9696
private const string _language = "csharp";
97-
private const string _sdkVersion = "5.5.0";
98-
private const string _sdkGenVersion = "2.317.0";
97+
private const string _sdkVersion = "5.5.1";
98+
private const string _sdkGenVersion = "2.319.10";
9999
private const string _openapiDocVersion = "0.4.0 .";
100-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
100+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
101101
private string _serverUrl = "";
102102
private ISpeakeasyHttpClient _defaultClient;
103103
private Func<Security>? _securitySource;

SpeakeasySDK/Artifacts.cs

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ public interface IArtifacts
4242
Task<Models.Operations.GetRevisionsResponse> GetRevisionsAsync(GetRevisionsRequest request);
4343
Task<Models.Operations.GetTagsResponse> GetTagsAsync(GetTagsRequest request);
4444

45+
/// <summary>
46+
/// Add tags to an existing revision
47+
/// </summary>
48+
Task<PostTagsResponse> PostTagsAsync(PostTagsRequest request);
49+
4550
/// <summary>
4651
/// Get access token for communicating with OCI distribution endpoints
4752
/// </summary>
@@ -52,10 +57,10 @@ public class Artifacts: IArtifacts
5257
{
5358
public SDKConfig SDKConfiguration { get; private set; }
5459
private const string _language = "csharp";
55-
private const string _sdkVersion = "5.5.0";
56-
private const string _sdkGenVersion = "2.317.0";
60+
private const string _sdkVersion = "5.5.1";
61+
private const string _sdkGenVersion = "2.319.10";
5762
private const string _openapiDocVersion = "0.4.0 .";
58-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
63+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
5964
private string _serverUrl = "";
6065
private ISpeakeasyHttpClient _defaultClient;
6166
private Func<Security>? _securitySource;
@@ -529,6 +534,94 @@ public async Task<GetManifestResponse> GetManifestAsync(GetManifestRequest reque
529534
}
530535
}
531536

537+
public async Task<PostTagsResponse> PostTagsAsync(PostTagsRequest request)
538+
{
539+
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
540+
var urlString = URLBuilder.Build(baseUrl, "/v1/artifacts/namespaces/{namespace_name}/tags", request);
541+
542+
var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString);
543+
httpRequest.Headers.Add("user-agent", _userAgent);
544+
545+
var serializedBody = RequestBodySerializer.Serialize(request, "AddTags", "json", false, true);
546+
if (serializedBody != null)
547+
{
548+
httpRequest.Content = serializedBody;
549+
}
550+
551+
if (_securitySource != null)
552+
{
553+
httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest);
554+
}
555+
556+
var hookCtx = new HookContext("postTags", null, _securitySource);
557+
558+
httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
559+
HttpResponseMessage httpResponse;
560+
try
561+
{
562+
httpResponse = await _defaultClient.SendAsync(httpRequest);
563+
int _statusCode = (int)httpResponse.StatusCode;
564+
565+
if (_statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
566+
{
567+
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null);
568+
if (_httpResponse != null)
569+
{
570+
httpResponse = _httpResponse;
571+
}
572+
}
573+
}
574+
catch (Exception error)
575+
{
576+
var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error);
577+
if (_httpResponse != null)
578+
{
579+
httpResponse = _httpResponse;
580+
}
581+
else
582+
{
583+
throw;
584+
}
585+
}
586+
587+
httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse);
588+
589+
var contentType = httpResponse.Content.Headers.ContentType?.MediaType;
590+
int responseStatusCode = (int)httpResponse.StatusCode;
591+
if(responseStatusCode == 200)
592+
{
593+
return new PostTagsResponse()
594+
{
595+
StatusCode = responseStatusCode,
596+
ContentType = contentType,
597+
RawResponse = httpResponse
598+
};;
599+
}
600+
else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600)
601+
{
602+
throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
603+
}
604+
else
605+
{
606+
if(Utilities.IsContentTypeMatch("application/json", contentType))
607+
{
608+
var obj = ResponseBodyDeserializer.Deserialize<Error>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
609+
var response = new PostTagsResponse()
610+
{
611+
StatusCode = responseStatusCode,
612+
ContentType = contentType,
613+
RawResponse = httpResponse
614+
};
615+
response.Error = obj;
616+
return response;
617+
}
618+
else
619+
{
620+
throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
621+
}
622+
}
623+
}
624+
532625
public async Task<PreflightResponse> PreflightAsync(PreflightRequest? request = null)
533626
{
534627
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();

SpeakeasySDK/Auth.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public class Auth: IAuth
6060
{
6161
public SDKConfig SDKConfiguration { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "5.5.0";
64-
private const string _sdkGenVersion = "2.317.0";
63+
private const string _sdkVersion = "5.5.1";
64+
private const string _sdkGenVersion = "2.319.10";
6565
private const string _openapiDocVersion = "0.4.0 .";
66-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
66+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
6767
private string _serverUrl = "";
6868
private ISpeakeasyHttpClient _defaultClient;
6969
private Func<Security>? _securitySource;

SpeakeasySDK/Embeds.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public class Embeds: IEmbeds
5656
{
5757
public SDKConfig SDKConfiguration { get; private set; }
5858
private const string _language = "csharp";
59-
private const string _sdkVersion = "5.5.0";
60-
private const string _sdkGenVersion = "2.317.0";
59+
private const string _sdkVersion = "5.5.1";
60+
private const string _sdkGenVersion = "2.319.10";
6161
private const string _openapiDocVersion = "0.4.0 .";
62-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
62+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
6363
private string _serverUrl = "";
6464
private ISpeakeasyHttpClient _defaultClient;
6565
private Func<Security>? _securitySource;

SpeakeasySDK/Events.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public class Events: IEvents
6060
{
6161
public SDKConfig SDKConfiguration { get; private set; }
6262
private const string _language = "csharp";
63-
private const string _sdkVersion = "5.5.0";
64-
private const string _sdkGenVersion = "2.317.0";
63+
private const string _sdkVersion = "5.5.1";
64+
private const string _sdkGenVersion = "2.319.10";
6565
private const string _openapiDocVersion = "0.4.0 .";
66-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
66+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
6767
private string _serverUrl = "";
6868
private ISpeakeasyHttpClient _defaultClient;
6969
private Func<Security>? _securitySource;

SpeakeasySDK/Metadata.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ public class Metadata: IMetadata
5151
{
5252
public SDKConfig SDKConfiguration { get; private set; }
5353
private const string _language = "csharp";
54-
private const string _sdkVersion = "5.5.0";
55-
private const string _sdkGenVersion = "2.317.0";
54+
private const string _sdkVersion = "5.5.1";
55+
private const string _sdkGenVersion = "2.319.10";
5656
private const string _openapiDocVersion = "0.4.0 .";
57-
private const string _userAgent = "speakeasy-sdk/csharp 5.5.0 2.317.0 0.4.0 . SpeakeasySDK";
57+
private const string _userAgent = "speakeasy-sdk/csharp 5.5.1 2.319.10 0.4.0 . SpeakeasySDK";
5858
private string _serverUrl = "";
5959
private ISpeakeasyHttpClient _defaultClient;
6060
private Func<Security>? _securitySource;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace SpeakeasySDK.Models.Operations
12+
{
13+
using SpeakeasySDK.Models.Shared;
14+
using SpeakeasySDK.Utils;
15+
16+
public class PostTagsRequest
17+
{
18+
19+
[SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name")]
20+
public string NamespaceName { get; set; } = default!;
21+
22+
/// <summary>
23+
/// A JSON representation of the tags to add
24+
/// </summary>
25+
[SpeakeasyMetadata("request:mediaType=application/json")]
26+
public AddTags? AddTags { get; set; }
27+
}
28+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace SpeakeasySDK.Models.Operations
12+
{
13+
using SpeakeasySDK.Models.Errors;
14+
using SpeakeasySDK.Utils;
15+
using System.Net.Http;
16+
using System;
17+
18+
public class PostTagsResponse
19+
{
20+
21+
/// <summary>
22+
/// HTTP response content type for this operation
23+
/// </summary>
24+
public string? ContentType { get; set; } = default!;
25+
26+
/// <summary>
27+
/// Default error response
28+
/// </summary>
29+
public Error? Error { get; set; }
30+
31+
/// <summary>
32+
/// HTTP response status code for this operation
33+
/// </summary>
34+
public int StatusCode { get; set; } = default!;
35+
36+
/// <summary>
37+
/// Raw HTTP response; suitable for custom response parsing
38+
/// </summary>
39+
public HttpResponseMessage RawResponse { get; set; } = default!;
40+
}
41+
}

SpeakeasySDK/Models/Shared/AddTags.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost when
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
#nullable enable
11+
namespace SpeakeasySDK.Models.Shared
12+
{
13+
using Newtonsoft.Json;
14+
using SpeakeasySDK.Utils;
15+
using System.Collections.Generic;
16+
17+
/// <summary>
18+
/// Request body of tags to add to a revision
19+
/// </summary>
20+
public class AddTags
21+
{
22+
23+
/// <summary>
24+
/// revision digest to add tags too sha256:...
25+
/// </summary>
26+
[JsonProperty("revision_digest")]
27+
public string RevisionDigest { get; set; } = default!;
28+
29+
/// <summary>
30+
/// string tags to add to the revision
31+
/// </summary>
32+
[JsonProperty("tags")]
33+
public List<string> Tags { get; set; } = default!;
34+
}
35+
}

0 commit comments

Comments
 (0)