Skip to content

Commit c9de27e

Browse files
authored
[AzureDataTransfer] Migrate to TypeSpec - First introduction to repo (#36413)
* init * get rid of armresponse * pipeline update * readmin * readme - 2 * reintroduce responsbe wrapper
1 parent 95c2917 commit c9de27e

File tree

6 files changed

+167
-108
lines changed

6 files changed

+167
-108
lines changed

specification/azuredatatransfer/AzureDataTransfer.Management/Flow.tsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ using TypeSpec.Rest;
1010
using Azure.ClientGenerator.Core;
1111
using Azure.ResourceManager;
1212
using TypeSpec.Http;
13-
using TypeSpec.OpenAPI;
1413

1514
namespace Microsoft.AzureDataTransfer;
1615
/**

specification/azuredatatransfer/AzureDataTransfer.Management/main.tsp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import "./Pipeline.tsp";
1717
import "./Flow.tsp";
1818
import "./ProviderActions.tsp";
1919

20-
using TypeSpec.Rest;
21-
using TypeSpec.Http;
22-
using Azure.ResourceManager.Foundations;
23-
using Azure.Core;
2420
using Azure.ResourceManager;
2521
using TypeSpec.Versioning;
2622
/**

specification/azuredatatransfer/AzureDataTransfer.Management/models.tsp

Lines changed: 111 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import "@typespec/http";
33
import "@azure-tools/typespec-azure-resource-manager";
44
import "@azure-tools/typespec-client-generator-core";
55

6-
using TypeSpec.Rest;
7-
using TypeSpec.Http;
86
using Azure.ResourceManager;
9-
using Azure.ClientGenerator.Core;
107
using Azure.ResourceManager.Foundations;
118

129
namespace Microsoft.AzureDataTransfer;
@@ -107,18 +104,18 @@ union ConnectionStatus {
107104
}
108105

109106
/**
110-
* Status of force disablement
107+
* Defines different disablement statuses and the circumstances in why they were disabled.
111108
*/
112109
union ForceDisabledStatus {
113110
string,
114111

115112
/**
116-
* This Flow has been disabled as the connection has been disabled.
113+
* Defines disablement of a Flow due to the parent connection being disabled.
117114
*/
118115
ConnectionForceDisabled: "ConnectionForceDisabled",
119116

120117
/**
121-
* This Flow has been disabled as the flow type this flow uses has been disabled.
118+
* Defines disablement of a Flow due to the linked flow type being disabled.
122119
*/
123120
FlowTypeForceDisabled: "FlowTypeForceDisabled",
124121
}
@@ -130,20 +127,18 @@ union LinkStatus {
130127
string,
131128

132129
/**
133-
* The pipeline, connection, or flow is currently linked with another corresponding pipeline,
134-
* connection, or flow, and can be used.
130+
* The pipeline, connection, or flow is currently linked with another corresponding pipeline, connection, or flow, and can be used.
135131
*/
136132
Linked: "Linked",
137133

138134
/**
139-
* The pipeline, connection, or flow is not linked with another corresponding pipeline,
140-
* connection, or flow, and cannot be used.
135+
* The pipeline, connection, or flow is not linked with another corresponding pipeline, connection, or flow, and cannot be used.
141136
*/
142137
Unlinked: "Unlinked",
143138
}
144139

145140
/**
146-
* Flow type for the specified resource
141+
* Flow type for the specified resource. FlowType will be deprecated starting from version 2025_05_30_preview - please create a FlowProfile resource instead.
147142
*/
148143
union FlowType {
149144
string,
@@ -169,7 +164,7 @@ union FlowType {
169164
Messaging: "Messaging",
170165

171166
/**
172-
* This flow sends data that will not be processed by any security system.
167+
* This flow sends standard data but is subject to strict cloud owner approval.
173168
*/
174169
Mission: "Mission",
175170

@@ -199,12 +194,12 @@ union FlowType {
199194
StreamingVideo: "StreamingVideo",
200195

201196
/**
202-
* This flow sends blobs that will not be processed by any security system.
197+
* This flow sends blobs but is subject to cloud owner approval.
203198
*/
204199
Opaque: "Opaque",
205200

206201
/**
207-
* This flow sends Extensible Markup Language that will not be processed by any security system.
202+
* This flow sends Extensible Markup Language that is subject to strict cloud owner approval
208203
*/
209204
MissionOpaqueXML: "MissionOpaqueXML",
210205

@@ -263,6 +258,40 @@ union OperationStatusEnum {
263258
Succeeded: "Succeeded",
264259
}
265260

261+
/**
262+
* The allowed statuses of a FlowProfile.
263+
*/
264+
union FlowProfileStatus {
265+
string,
266+
267+
/**
268+
* Defines a FlowProfile that can no longer be selected.
269+
*/
270+
Obsolete: "Obsolete",
271+
272+
/**
273+
* Defines a FlowProfile that is enabled.
274+
*/
275+
Enabled: "Enabled",
276+
}
277+
278+
/**
279+
* Enablement statuses
280+
*/
281+
union EnablementStatus {
282+
string,
283+
284+
/**
285+
* Represents an enabled status.
286+
*/
287+
Enabled: "Enabled",
288+
289+
/**
290+
* Represents a disabled status.
291+
*/
292+
Disabled: "Disabled",
293+
}
294+
266295
/**
267296
* Status of the current pipeline
268297
*/
@@ -360,8 +389,7 @@ union IdentityTranslation {
360389
string,
361390

362391
/**
363-
* The API flow will make use of the user identity that called this API flow, and pass that token
364-
* through the boundary.
392+
* The API flow will make use of the user identity that called this API flow, and pass that token through the boundary.
365393
*/
366394
UserIdentity: "UserIdentity",
367395

@@ -416,7 +444,7 @@ union TargetType {
416444
}
417445

418446
/**
419-
* The request used to list approved schemas within the resource provider.
447+
* The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest will be deprecated after from version 2025_05_30_preview - please manage schemas with a FlowProfile resource instead.
420448
*/
421449
model ListApprovedSchemasRequest {
422450
/**
@@ -431,7 +459,7 @@ model ListApprovedSchemasRequest {
431459
}
432460

433461
/**
434-
* The schemas list result.
462+
* The schemas list result. SchemaListResults will be deprecated starting from version 2025_05_30_preview - please manage schemas with a FlowProfile resource instead.
435463
*/
436464
model SchemasListResult {
437465
/**
@@ -441,7 +469,7 @@ model SchemasListResult {
441469
}
442470

443471
/**
444-
* The schema object.
472+
* The schema object. Schemas will be deprecated starting from version 2025_05_30_preview - please manage schemas with a FlowProfile resource instead.
445473
*/
446474
model Schema {
447475
/**
@@ -486,7 +514,7 @@ model Schema {
486514
}
487515

488516
/**
489-
* Result of the schema validation.
517+
* Result of the schema validation. ValidateSchemaResult will be deprecated starting from version 2025_05_30_preview - please manage schemas with a FlowProfile resource instead.
490518
*/
491519
model ValidateSchemaResult {
492520
/**
@@ -550,7 +578,7 @@ model ConnectionProperties {
550578
linkedConnectionId?: string;
551579

552580
/**
553-
* The flow types being requested for this connection
581+
* The flow types being requested for this connection. This FlowType property is deprecated starting from version 2025_05_30_preview - please create a FlowProfile resource instead.
554582
*/
555583
flowTypes?: FlowType[];
556584

@@ -632,7 +660,7 @@ model PipelineProperties {
632660
*/
633661
@visibility(Lifecycle.Read)
634662
@OpenAPI.extension("x-ms-identifiers", #["id"])
635-
connections?: Read<PipelineConnection>[];
663+
connections?: ReadPipelineConnection[];
636664

637665
/**
638666
* Subscribers of this resource
@@ -652,7 +680,7 @@ model PipelineProperties {
652680
policies?: string[];
653681

654682
/**
655-
* The flow types allowed for this pipeline
683+
* The flow type for this flow
656684
*/
657685
flowTypes?: FlowType[];
658686

@@ -718,25 +746,6 @@ model PipelineConnection {
718746
*/
719747
@visibility(Lifecycle.Read)
720748
systemData?: SystemData;
721-
722-
/**
723-
* Connection properties inside pipeline
724-
*/
725-
@visibility(Lifecycle.Read)
726-
properties?: PipelineConnectionProperties;
727-
}
728-
729-
/**
730-
* Connection properties inside pipeline
731-
*/
732-
model PipelineConnectionProperties {
733-
...Record<unknown>;
734-
735-
/**
736-
* Internal metadata of the connection inside pipeline.
737-
*/
738-
@visibility(Lifecycle.Read)
739-
internalMetadata?: InternalMetadataProperties;
740749
}
741750

742751
/**
@@ -1012,7 +1021,7 @@ model MessagingOptions {
10121021
*/
10131022
model ApiFlowOptions {
10141023
/**
1015-
* Remote host to which communication needs to be made
1024+
* Remote host to which communication needs to be made. Deprecated starting 2025-05-30-preview.
10161025
*/
10171026
remoteEndpoint?: string;
10181027

@@ -1027,22 +1036,22 @@ model ApiFlowOptions {
10271036
apiMode?: ApiMode;
10281037

10291038
/**
1030-
* Flag for if Azure Data Transfer API Flow should extract the user token
1039+
* Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. Deprecated starting 2025-05-30-preview.
10311040
*/
10321041
identityTranslation?: IdentityTranslation;
10331042

10341043
/**
1035-
* Sender's app user assigned Manage Identity client ID
1044+
* Sender's app user assigned Manage Identity client ID. Deprecated starting 2025-05-30-preview.
10361045
*/
10371046
senderClientId?: string;
10381047

10391048
/**
1040-
* Remote stub app registration Client ID
1049+
* Remote stub app registration Client ID. Deprecated starting 2025-05-30-preview.
10411050
*/
10421051
remoteCallingModeClientId?: string;
10431052

10441053
/**
1045-
* Optional field to override the audience of the remote endpoint
1054+
* Optional field to override the audience of the remote endpoint. Deprecated starting 2025-05-30-preview.
10461055
*/
10471056
audienceOverride?: string;
10481057
}
@@ -1345,3 +1354,58 @@ model AzureResourceManagerArmResponsePipeline {
13451354
*/
13461355
body: Pipeline;
13471356
}
1357+
1358+
/**
1359+
* The ReadPipelineconnection.
1360+
*/
1361+
model ReadPipelineConnection {
1362+
...Record<unknown>;
1363+
1364+
/**
1365+
* Connection id inside pipeline
1366+
*/
1367+
id: string;
1368+
1369+
/**
1370+
* Connection name inside pipeline
1371+
*/
1372+
name?: string;
1373+
1374+
/**
1375+
* Connection type inside pipeline
1376+
*/
1377+
type?: string;
1378+
1379+
/**
1380+
* Connection location inside pipeline
1381+
*/
1382+
location?: string;
1383+
1384+
/**
1385+
* Connection etag inside pipeline
1386+
*/
1387+
etag?: string;
1388+
1389+
/**
1390+
* Metadata pertaining to creation and last modification of the resource.
1391+
*/
1392+
systemData?: SystemData;
1393+
1394+
/**
1395+
* Connection properties inside pipeline
1396+
*/
1397+
properties?: PipelineConnectionProperties;
1398+
}
1399+
1400+
/**
1401+
* Connection properties inside pipeline
1402+
*/
1403+
model PipelineConnectionProperties {
1404+
...Record<unknown>;
1405+
1406+
/**
1407+
* Internal metadata of the connection inside pipeline.
1408+
*/
1409+
@visibility(Lifecycle.Read)
1410+
internalMetadata?: InternalMetadataProperties;
1411+
}

0 commit comments

Comments
 (0)