Skip to content

Commit 20b6a5a

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.460.3
1 parent b22efa4 commit 20b6a5a

File tree

403 files changed

+7898
-11004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+7898
-11004
lines changed

.speakeasy/gen.lock

Lines changed: 505 additions & 207 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
speakeasyVersion: 1.400.0
1+
speakeasyVersion: 1.460.3
22
sources:
33
speakeasy:
44
sourceNamespace: speakeasy
5-
sourceRevisionDigest: sha256:780f67279a06564bd229dec0bc85843b7304309e58668de26325742aa8c7b921
6-
sourceBlobDigest: sha256:88704527b94e0f552679a1b9305054543883de59097a5102e669d5f049d7929e
5+
sourceRevisionDigest: sha256:b01713c2d0f7d6cb0e47e321616c4b091bcd5576d7b2c62f955b835328df57f5
6+
sourceBlobDigest: sha256:2b1030ee3c1d82bb205f4230146d4632dcd59cc07c2eb266d5f294390b1188c3
77
tags:
88
- latest
9-
- main
9+
- speakeasy-sdk-regen-1727137180
10+
- 0.4.0
1011
targets:
1112
speakeasy-client-sdk-csharp:
1213
source: speakeasy
1314
sourceNamespace: speakeasy
14-
sourceRevisionDigest: sha256:780f67279a06564bd229dec0bc85843b7304309e58668de26325742aa8c7b921
15-
sourceBlobDigest: sha256:88704527b94e0f552679a1b9305054543883de59097a5102e669d5f049d7929e
15+
sourceRevisionDigest: sha256:b01713c2d0f7d6cb0e47e321616c4b091bcd5576d7b2c62f955b835328df57f5
16+
sourceBlobDigest: sha256:2b1030ee3c1d82bb205f4230146d4632dcd59cc07c2eb266d5f294390b1188c3
1617
codeSamplesNamespace: code-samples-csharp-speakeasy-client-sdk-csharp
17-
codeSamplesRevisionDigest: sha256:f4c81795d8921b1fc5c4ada4b7c29196d1435a034ec4c259d2c889209884384e
18+
codeSamplesRevisionDigest: sha256:e3459fb0f108d6f6ada42a1292ba28d87d3cdf1ff569ac7b526019a65feb98c8
1819
workflow:
1920
workflowVersion: 1.0.0
2021
speakeasyVersion: latest

NUGET.md

Lines changed: 145 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,99 @@
88

99
```csharp
1010
using SpeakeasySDK;
11-
using SpeakeasySDK.Models.Operations;
12-
using System.Collections.Generic;
1311
using SpeakeasySDK.Models.Shared;
12+
using System;
13+
using System.Collections.Generic;
1414

1515
var sdk = new SDK(security: new Security() {
1616
APIKey = "<YOUR_API_KEY_HERE>",
1717
});
1818

19-
GetApisRequest req = new GetApisRequest() {};
19+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
20+
Languages = new List<string>() {
21+
"<value>",
22+
},
23+
SchemaFile = new SchemaFile() {
24+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
25+
FileName = "example.file",
26+
},
27+
};
2028

21-
var res = await sdk.Apis.GetApisAsync(req);
29+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
2230

2331
// handle response
2432
```
2533
<!-- End SDK Example Usage [usage] -->
2634

27-
<!-- Start Global Parameters [global-parameters] -->
28-
## Global Parameters
35+
<!-- Start Authentication [security] -->
36+
## Authentication
37+
38+
### Per-Client Security Schemes
39+
40+
This SDK supports the following security schemes globally:
41+
42+
| Name | Type | Scheme |
43+
| --------------------- | ------ | ----------- |
44+
| `APIKey` | apiKey | API key |
45+
| `Bearer` | http | HTTP Bearer |
46+
| `WorkspaceIdentifier` | apiKey | API key |
47+
48+
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
49+
```csharp
50+
using SpeakeasySDK;
51+
using SpeakeasySDK.Models.Shared;
52+
using System;
53+
using System.Collections.Generic;
2954

55+
var sdk = new SDK(security: new Security() {
56+
APIKey = "<YOUR_API_KEY_HERE>",
57+
});
58+
59+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
60+
Languages = new List<string>() {
61+
"<value>",
62+
},
63+
SchemaFile = new SchemaFile() {
64+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
65+
FileName = "example.file",
66+
},
67+
};
68+
69+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
70+
71+
// handle response
72+
```
73+
<!-- End Authentication [security] -->
74+
75+
<!-- Start Global Parameters [global-parameters] -->
3076
## Global Parameters
3177

3278
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
3379

34-
For example, you can set `workspaceID` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetWorkspace`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
80+
For example, you can set `workspace_id` to `"<id>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetAccessToken`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
3581

3682

3783
### Available Globals
3884

3985
The following global parameter is available.
4086

41-
| Name | Type | Required | Description |
42-
| ---- | ---- |:--------:| ----------- |
43-
| workspaceID | string | | The WorkspaceID parameter. |
44-
87+
| Name | Type | Description |
88+
| ----------- | ------ | -------------------------- |
89+
| workspaceId | string | The WorkspaceId parameter. |
4590

4691
### Example
4792

4893
```csharp
4994
using SpeakeasySDK;
5095
using SpeakeasySDK.Models.Operations;
51-
using SpeakeasySDK.Models.Shared;
5296

53-
var sdk = new SDK(security: new Security() {
54-
APIKey = "<YOUR_API_KEY_HERE>",
55-
});
97+
var sdk = new SDK();
5698

57-
GetWorkspaceRequest req = new GetWorkspaceRequest() {};
99+
GetAccessTokenRequest req = new GetAccessTokenRequest() {
100+
WorkspaceId = "<id>",
101+
};
58102

59-
var res = await sdk.Workspaces.GetWorkspaceAsync(req);
103+
var res = await sdk.Auth.GetAccessTokenAsync(req);
60104

61105
// handle response
62106
```
@@ -79,7 +123,7 @@ var sdk = new SDK(security: new Security() {
79123

80124
GetWorkspaceAccessRequest req = new GetWorkspaceAccessRequest() {};
81125

82-
var res = await sdk.Auth.GetWorkspaceAccessAsync(
126+
var res = await sdk.Auth.GetAccessAsync(
83127
retryConfig: new RetryConfig(
84128
strategy: RetryConfig.RetryStrategy.BACKOFF,
85129
backoff: new BackoffStrategy(
@@ -89,7 +133,9 @@ var res = await sdk.Auth.GetWorkspaceAccessAsync(
89133
exponent: 1.1
90134
),
91135
retryConnectionErrors: false
92-
),req);
136+
),
137+
request: req
138+
);
93139

94140
// handle response
95141
```
@@ -118,7 +164,7 @@ var sdk = new SDK(
118164

119165
GetWorkspaceAccessRequest req = new GetWorkspaceAccessRequest() {};
120166

121-
var res = await sdk.Auth.GetWorkspaceAccessAsync(req);
167+
var res = await sdk.Auth.GetAccessAsync(req);
122168

123169
// handle response
124170
```
@@ -127,43 +173,63 @@ var res = await sdk.Auth.GetWorkspaceAccessAsync(req);
127173
<!-- Start Error Handling [errors] -->
128174
## Error Handling
129175

130-
Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type.
176+
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
177+
178+
By default, an API error will raise a `SpeakeasySDK.Models.Errors.SDKException` exception, which has the following properties:
131179

132-
| Error Object | Status Code | Content Type |
133-
| --------------------------------------- | --------------------------------------- | --------------------------------------- |
134-
| SpeakeasySDK.Models.Errors.Error | 5XX | application/json |
135-
| SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | */* |
180+
| Property | Type | Description |
181+
|---------------|-----------------------|-----------------------|
182+
| `Message` | *string* | The error message |
183+
| `StatusCode` | *int* | The HTTP status code |
184+
| `RawResponse` | *HttpResponseMessage* | The raw HTTP response |
185+
| `Body` | *string* | The response content |
186+
187+
When custom error responses are specified for an operation, the SDK may also throw their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `GenerateCodeSamplePreviewAsync` method throws the following exceptions:
188+
189+
| Error Type | Status Code | Content Type |
190+
| -------------------------------- | ----------- | ---------------- |
191+
| SpeakeasySDK.Models.Errors.Error | 4XX, 5XX | application/json |
136192

137193
### Example
138194

139195
```csharp
140196
using SpeakeasySDK;
141-
using SpeakeasySDK.Models.Operations;
197+
using SpeakeasySDK.Models.Errors;
142198
using SpeakeasySDK.Models.Shared;
143199
using System;
144-
using SpeakeasySDK.Models.Errors;
200+
using System.Collections.Generic;
145201

146202
var sdk = new SDK(security: new Security() {
147203
APIKey = "<YOUR_API_KEY_HERE>",
148204
});
149205

150206
try
151207
{
152-
GetWorkspaceFeatureFlagsRequest req = new GetWorkspaceFeatureFlagsRequest() {};
153-
154-
var res = await sdk.Workspaces.GetWorkspaceFeatureFlagsAsync(req);
208+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
209+
Languages = new List<string>() {
210+
"<value>",
211+
},
212+
SchemaFile = new SchemaFile() {
213+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
214+
FileName = "example.file",
215+
},
216+
};
217+
218+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
155219

156220
// handle response
157221
}
158222
catch (Exception ex)
159223
{
160224
if (ex is Error)
161225
{
162-
// handle exception
226+
// Handle exception data
227+
throw;
163228
}
164229
else if (ex is SpeakeasySDK.Models.Errors.SDKException)
165230
{
166-
// handle exception
231+
// Handle default exception
232+
throw;
167233
}
168234
}
169235
```
@@ -176,48 +242,70 @@ catch (Exception ex)
176242

177243
You can override the default server globally by passing a server name to the `server: string` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
178244

179-
| Name | Server | Variables |
180-
| ----- | ------ | --------- |
181-
| `prod` | `https://api.prod.speakeasyapi.dev` | None |
182-
245+
| Name | Server |
246+
| ------ | ----------------------------------- |
247+
| `prod` | `https://api.prod.speakeasyapi.dev` |
183248

249+
#### Example
184250

185-
### Override Server URL Per-Client
251+
```csharp
252+
using SpeakeasySDK;
253+
using SpeakeasySDK.Models.Shared;
254+
using System;
255+
using System.Collections.Generic;
186256

187-
The default server can also be overridden globally by passing a URL to the `serverUrl: str` optional parameter when initializing the SDK client instance. For example:
188-
<!-- End Server Selection [server] -->
257+
var sdk = new SDK(
258+
server: "prod",
259+
security: new Security() {
260+
APIKey = "<YOUR_API_KEY_HERE>",
261+
}
262+
);
189263

190-
<!-- Start Authentication [security] -->
191-
## Authentication
264+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
265+
Languages = new List<string>() {
266+
"<value>",
267+
},
268+
SchemaFile = new SchemaFile() {
269+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
270+
FileName = "example.file",
271+
},
272+
};
192273

193-
### Per-Client Security Schemes
274+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
194275

195-
This SDK supports the following security schemes globally:
276+
// handle response
277+
```
196278

197-
| Name | Type | Scheme |
198-
| ----------- | ----------- | ----------- |
199-
| `APIKey` | apiKey | API key |
200-
| `Bearer` | http | HTTP Bearer |
279+
### Override Server URL Per-Client
201280

202-
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
281+
The default server can also be overridden globally by passing a URL to the `serverUrl: string` optional parameter when initializing the SDK client instance. For example:
203282
```csharp
204283
using SpeakeasySDK;
205-
using SpeakeasySDK.Models.Operations;
206284
using SpeakeasySDK.Models.Shared;
285+
using System;
286+
using System.Collections.Generic;
207287

208-
var sdk = new SDK(security: new Security() {
209-
APIKey = "<YOUR_API_KEY_HERE>",
210-
});
288+
var sdk = new SDK(
289+
serverUrl: "https://api.prod.speakeasyapi.dev",
290+
security: new Security() {
291+
APIKey = "<YOUR_API_KEY_HERE>",
292+
}
293+
);
211294

212-
DeleteApiRequest req = new DeleteApiRequest() {
213-
ApiID = "<value>",
214-
VersionID = "<value>",
295+
CodeSampleSchemaInput req = new CodeSampleSchemaInput() {
296+
Languages = new List<string>() {
297+
"<value>",
298+
},
299+
SchemaFile = new SchemaFile() {
300+
Content = System.Text.Encoding.UTF8.GetBytes("0xc3dD8BfBef"),
301+
FileName = "example.file",
302+
},
215303
};
216304

217-
var res = await sdk.Apis.DeleteApiAsync(req);
305+
var res = await sdk.GenerateCodeSamplePreviewAsync(req);
218306

219307
// handle response
220308
```
221-
<!-- End Authentication [security] -->
309+
<!-- End Server Selection [server] -->
222310

223311
<!-- Placeholder for Future Speakeasy SDK Sections -->

0 commit comments

Comments
 (0)