From 04a935505606e59e8f0c4858019c9bcc62eb7704 Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Mon, 9 Jan 2023 10:24:40 +0800 Subject: [PATCH 1/5] cadl --- .../azure-core-foundations-extensions.cadl | 268 ++++++++++++++ .../adp/Adp.Shared/cadl-project.yaml | 29 ++ .../adp/Adp.Shared/classification/main.cadl | 2 + .../adp/Adp.Shared/classification/models.cadl | 31 ++ .../cadl-python/adp/Adp.Shared/client.cadl | 6 + .../cadl-python/adp/Adp.Shared/common.cadl | 5 + .../LongRunningOperations_GetStatus.json | 37 ++ packages/cadl-python/adp/Adp.Shared/main.cadl | 20 ++ .../cadl-python/adp/Adp.Shared/models.cadl | 167 +++++++++ .../adp/Adp.Shared/operations.cadl | 12 + .../cadl-python/adp/Adp.Shared/package.json | 44 +++ packages/cadl-python/adp/Core/.prettierrc | 32 ++ .../cadl-python/adp/Core/cadl-project.yaml | 23 ++ packages/cadl-python/adp/Core/cadl.md | 22 ++ .../adp/Core/classification/main.cadl | 5 + .../adp/Core/classification/models.cadl | 37 ++ .../adp/Core/classification/operations.cadl | 36 ++ packages/cadl-python/adp/Core/client.cadl | 276 ++++++++++++++ ...ClassificationSchemaOperations_Create.json | 47 +++ ...ClassificationSchemaOperations_Delete.json | 39 ++ .../ClassificationSchemaOperations_Get.json | 27 ++ ...ClassificationSchemaOperations_GetAll.json | 41 +++ .../2023-00-00-preview/CreateSample.json | 42 +++ .../CreateSampleClassification.json | 34 ++ ...StreamClassificationOperations_Create.json | 54 +++ ...StreamClassificationOperations_Delete.json | 45 +++ ...ataStreamClassificationOperations_Get.json | 29 ++ ...StreamClassificationOperations_GetAll.json | 33 ++ .../DataStreamFileOperations_Generate.json | 38 ++ .../DataStreamFileOperations_GetAll.json | 24 ++ ...ogsContainerOperations_GetWritableUri.json | 16 + .../DataStreamOperations_ClearContent.json | 55 +++ .../DataStreamOperations_Complete.json | 65 ++++ .../DataStreamOperations_Create.json | 79 ++++ .../DataStreamOperations_Fail.json | 65 ++++ .../DataStreamOperations_FindByLineage.json | 64 ++++ .../DataStreamOperations_FindByTags.json | 54 +++ .../DataStreamOperations_Get.json | 43 +++ .../DataStreamOperations_GetAll.json | 67 ++++ ...mOperations_GetLineageGraphsByLineage.json | 73 ++++ .../DataStreamOperations_StageFiles.json | 39 ++ ...reamStorageOperations_CreateOrReplace.json | 69 ++++ .../DataStreamStorageOperations_Get.json | 40 +++ ...StorageOperations_GetWithWritableUris.json | 40 +++ ...aStreamTagsOperations_CreateOrReplace.json | 39 ++ .../DataStreamTagsOperations_Get.json | 23 ++ .../2023-00-00-preview/DeleteSample.json | 25 ++ .../DeleteSampleClassification.json | 26 ++ .../DiscoveryOperations_Cancel.json | 48 +++ .../DiscoveryOperations_Complete.json | 48 +++ .../DiscoveryOperations_CreateOrReplace.json | 39 ++ .../DiscoveryOperations_Get.json | 29 ++ .../DiscoveryResultUploadOperations_List.json | 38 ++ ...scoverySpecialFileOperations_Generate.json | 44 +++ .../DiscoverySpecialFileOperations_List.json | 36 ++ ...pecialFileOperations_ListWritableUris.json | 36 ++ .../2023-00-00-preview/GetSampleById.json | 28 ++ .../GetSampleClassification.json | 26 ++ .../ListSampleClassifications.json | 41 +++ .../2023-00-00-preview/ListSamples.json | 46 +++ .../LongRunningOperationStatus.json | 37 ++ .../LongRunningOperations_GetStatus.json | 38 ++ ...rementClassificationOperations_Create.json | 48 +++ ...rementClassificationOperations_Delete.json | 40 +++ ...asurementClassificationOperations_Get.json | 28 ++ ...rementClassificationOperations_GetAll.json | 32 ++ ...ntMetadataFileInfoOperations_Complete.json | 47 +++ ...urementMetadataFileInfoOperations_Get.json | 27 ++ ...dataFileInfoOperations_GetWritableUri.json | 27 ++ .../MeasurementMetadataOperations_Get.json | 29 ++ ...tMetadataSchemaFileInfoOperations_Get.json | 26 ++ .../MeasurementOperations_Delete.json | 39 ++ .../MeasurementOperations_FindByIds.json | 32 ++ .../MeasurementOperations_Get.json | 33 ++ .../MeasurementOperations_GetAll.json | 37 ++ ...rovideMetadataFileDownloadInformation.json | 26 ++ ..._ProvideMetadataFileUploadInformation.json | 26 ++ ...rations_QueryMeasurementsWithMetadata.json | 42 +++ ...rementProcessingResultsOperations_Get.json | 38 ++ ...MeasurementStateMachineOperations_Act.json | 49 +++ ...MeasurementStateMachineOperations_Get.json | 30 ++ ...surementStateMachineOperations_GetAll.json | 34 ++ .../2023-00-00-preview/RunSampleWorkflow.json | 25 ++ .../SetLabelsWithPatch.json | 40 +++ .../UploadDataFileOperations_Generate.json | 45 +++ .../UploadDataFileOperations_GetAll.json | 35 ++ ...adDataFileOperations_ListWritableUris.json | 35 ++ .../UploadOperations_Cancel.json | 49 +++ .../UploadOperations_Complete.json | 49 +++ .../UploadOperations_CreateOrReplace.json | 42 +++ .../UploadOperations_Get.json | 30 ++ ...oadResultMeasurementOperations_GetAll.json | 33 ++ .../UploadSpecialFileOperations_Generate.json | 44 +++ .../UploadSpecialFileOperations_GetAll.json | 35 ++ ...pecialFileOperations_ListWritableUris.json | 35 ++ .../adp/Core/ingestion/discovery/main.cadl | 3 + .../adp/Core/ingestion/discovery/models.cadl | 138 +++++++ .../Core/ingestion/discovery/operations.cadl | 67 ++++ .../cadl-python/adp/Core/ingestion/main.cadl | 3 + .../adp/Core/ingestion/upload/main.cadl | 3 + .../adp/Core/ingestion/upload/models.cadl | 198 ++++++++++ .../adp/Core/ingestion/upload/operations.cadl | 92 +++++ packages/cadl-python/adp/Core/main.cadl | 17 + .../Core/measurement/classification/main.cadl | 3 + .../measurement/classification/models.cadl | 20 ++ .../classification/operations.cadl | 35 ++ .../data-stream/classification/main.cadl | 3 + .../data-stream/classification/models.cadl | 21 ++ .../classification/operations.cadl | 35 ++ .../Core/measurement/data-stream/main.cadl | 3 + .../Core/measurement/data-stream/models.cadl | 340 ++++++++++++++++++ .../measurement/data-stream/operations.cadl | 159 ++++++++ .../adp/Core/measurement/main.cadl | 6 + .../adp/Core/measurement/models.cadl | 261 ++++++++++++++ .../adp/Core/measurement/operations.cadl | 121 +++++++ packages/cadl-python/adp/Core/models.cadl | 12 + packages/cadl-python/adp/Core/operations.cadl | 17 + packages/cadl-python/adp/Core/package.json | 182 ++++++++++ 118 files changed, 5847 insertions(+) create mode 100644 packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/cadl-project.yaml create mode 100644 packages/cadl-python/adp/Adp.Shared/classification/main.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/classification/models.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/client.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/common.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json create mode 100644 packages/cadl-python/adp/Adp.Shared/main.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/models.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/operations.cadl create mode 100644 packages/cadl-python/adp/Adp.Shared/package.json create mode 100644 packages/cadl-python/adp/Core/.prettierrc create mode 100644 packages/cadl-python/adp/Core/cadl-project.yaml create mode 100644 packages/cadl-python/adp/Core/cadl.md create mode 100644 packages/cadl-python/adp/Core/classification/main.cadl create mode 100644 packages/cadl-python/adp/Core/classification/models.cadl create mode 100644 packages/cadl-python/adp/Core/classification/operations.cadl create mode 100644 packages/cadl-python/adp/Core/client.cadl create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json create mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json create mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/main.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/models.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/main.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/upload/main.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/upload/models.cadl create mode 100644 packages/cadl-python/adp/Core/ingestion/upload/operations.cadl create mode 100644 packages/cadl-python/adp/Core/main.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/classification/main.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/classification/models.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/classification/operations.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/main.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/models.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/main.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/models.cadl create mode 100644 packages/cadl-python/adp/Core/measurement/operations.cadl create mode 100644 packages/cadl-python/adp/Core/models.cadl create mode 100644 packages/cadl-python/adp/Core/operations.cadl create mode 100644 packages/cadl-python/adp/Core/package.json diff --git a/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl b/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl new file mode 100644 index 00000000000..0bfb93f38e6 --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl @@ -0,0 +1,268 @@ +using Cadl.Http; +using Cadl.Rest; +using Cadl.Versioning; +using Azure.Core; +using Azure.Core.Foundations; +using Adp; + +@versioned(Versions) +@versionedDependency( + [[Versions.v1_0_Preview_1, Adp.Versions.v2023_00_00_for_public_preview]] +) +namespace Azure.Core.Foundations.Extensions; + +enum Versions { + v1_0_Preview_1, +} + +/* + This CADL file was created to customize the existing implementation from the foundations library. + In this file we have addressed the following issues: + 1. Avoid inlining of the models - required by ADP backend and also by the AutoRest. All models must be references and have schema definitions in the OpenApi spec. + 2. In ADP we are using slightly different model for LRO. It has additional state [Created] and the operation type property. + 3. The `CustomBodyWrapper` just adds the `@doc` to the body element to suppress warnings during the spec validation. + 4. The `CustomResourceOkResponse` wraps the with `@body`. + 5. The `CustomErrorResponse` adds missing header `x-ms-error-code` to the default error response + 6. For all LRO operations - add operation status location header and OK response where necessary to align with AutoRest code generator. + 7. The `CustomSingletonResource` has been introduced to allow operations on singleton child resources that have no identifier. +*/ + +@doc(""" +Note, by adding this model we solve AutoRest validation issue. +Autorest requires that required properties will not be read-only. + +Provides the 'ETag' field to enable conditional (cached) requests. This model can be spread +into responses and item models to convey the ETag when it cannot simplybe conveyed in a header. +""") +model CustomEtagProperty { + @visibility("read", "update") + @doc("The entity tag for this resource.") + etag: string; +} + +@doc("List {name} resources", TResource) +op CustomResourceList< + TResource extends object, + TCustom extends Foundations.CustomizationFields = {} +> is Foundations.ResourceList< + TResource, + Foundations.CustomParameters, + Page +>; + +@doc("Creates or replaces a {name}", TResource) +@createsOrReplacesResource(TResource) +op CustomResourceCreateOrReplace< + TResource extends object, + TResourceCreateParams extends object +> is Foundations.ResourceOperation< + TResource, + TResourceCreateParams, + CustomResourceCreatedOrOkResponse +>; + +@doc("A wrapper for optional parameter in the body. The intent of model is to add description to 'body'") +model CustomBodyWrapper { + @doc("Parameter of type '{name}' in the body.", T) + @body + body?: T; +} + +@doc("A wrapper for required parameter in the body. The intent of model is to add description to 'body' and make it requred.") +model CustomRequiredBodyWrapper { + @doc("Parameter of type '{name}' in the body.", T) + @body + body: T; +} + +@doc("A {name} resource was successfully created.", T) +model CustomResourceCreatedResponse { + ...Cadl.Http.Response<201>; + @body body: T; +} + +model CustomResourceOkResponse { + ...Cadl.Http.Response<200>; + @body body: T; +} + +alias CustomResourceCreatedOrOkResponse = CustomResourceCreatedResponse | CustomResourceOkResponse; + +@autoRoute +@doc("Creates a {name}.", TResource) +@createsResource(TResource) +op CustomLongRunningResourceCreateUsingHttpPost< + TResource extends object, + TResourceCreateParams extends object = {}, + TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders +>( + ...Foundations.CollectionKeysOf, + ...TResourceCreateParams, + ...Foundations.ApiVersionParameter, + ...Foundations.CustomParameters, + ...LongRunningOperationIdHeader +): (AcceptedResponse> & + Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; + +@autoRoute +@doc("Creates a {name}", TResource) +@createsResource(TResource) +op CustomLongRunningResourceCreateWithServiceProvidedName< + TResource extends object, + TResourceCreateParams extends object = {}, + TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders +>( + ...Foundations.CollectionKeysOf, + ...TResourceCreateParams, + ...Foundations.ApiVersionParameter, + ...Foundations.CustomParameters, + ...LongRunningOperationIdHeader +): (AcceptedResponse> & + Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; + +@action +@autoRoute +@actionSeparator(":") +@doc( + "Runs a custom action on {name} as long-running operation (LRO)", + TResource +) +op CustomLongRunningResourceAction< + TResource extends object, + TRequestParameters extends object = {}, + TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders +>( + ...Foundations.ItemKeysOf, + ...TRequestParameters, + ...Foundations.ApiVersionParameter, + ...Foundations.CustomParameters, + ...LongRunningOperationIdHeader +): (AcceptedResponse> & + Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; + +@action +@autoRoute +@actionSeparator(":") +@doc( + "Runs a custom action on {name} as long-running operation (LRO)", + TResource +) +op CustomLongRunningResourceActionWithParameters< + TResource extends object, + TParams extends object = {}, + TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders +>( + ...Foundations.ItemKeysOf, + ...TParams, + ...Foundations.ApiVersionParameter, + ...Foundations.CustomParameters, + ...LongRunningOperationIdHeader +): (AcceptedResponse> & + Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; + +#suppress "@azure-tools/cadl-azure-resource-manager/no-response-body" "This operation must return a status monitor in its response." +@autoRoute +@collectionAction(TResource) +@actionSeparator(":") +op CustomLongRunningResourceCollectionAction< + TResource extends object, + TParams extends object = {}, + TResponse extends object = TResource +> is Foundations.ResourceCollectionOperation< + TResource, + TParams & LongRunningOperationIdHeader & CustomRepeatabilityRequestHeaders, + (AcceptedResponse> & + CustomRepeatabilityResponseHeaders & + LongRunningOperationStatusLocationHeader) | CustomResourceOkResponse +>; + +#suppress "@azure-tools/cadl-azure-resource-manager/no-response-body" "We do support bodies in data plane service APIs..." +@delete +@autoRoute +@doc("Delete a {name} asynchronously.", TResource) +@deletesResource(TResource) +op CustomLongRunningResourceDelete( + ...Foundations.ItemKeysOf, + ...Foundations.ApiVersionParameter, + ...LongRunningOperationIdHeader +): (AcceptedResponse> & + LongRunningOperationStatusLocationHeader) | NoContentResponse | CustomErrorResponse; + +@doc("Error response with 'x-ms-error-code' header.") +@friendlyName("CustomErrorResponse") +model CustomErrorResponse is Foundations.ErrorResponse { + ...XmsErrorCodeHeader; +} + +@autoRoute +@get +op CustomSingletonResourceRead< + TResource extends object, + TParams extends object = {}, + TResponse extends object = TResource +> is Foundations.ResourceCollectionOperation< + TResource, + TParams, + CustomResourceOkResponse +>; + +@doc("Creates or replaces a {name}", TResource) +@createsOrReplacesResource(TResource) +@autoRoute +op CustomSingletonResourceCreateOrReplace< + TResource extends object, + TParams extends object, + TResponse extends object = TResource +> is Foundations.ResourceCollectionOperation< + TResource, + TParams, + CustomResourceCreatedOrOkResponse +>; + +@doc("Indicates whether the repeatable request was accepted or rejected.") +enum RepeatabilityResult { + "accepted", + "rejected", +} + +@doc("Provides the 'Repeatability-Result' header to enable repeatable requests.") +model CustomRepeatabilityResponseHeaders { + @visibility("read") + @header("Repeatability-Result") + @doc("Indicates whether the repeatable request was accepted or rejected.") + repeatabilityResult?: RepeatabilityResult; +} + +@doc("Provides the 'Repeatability-*' headers to support repeatability for POST requests.") +model CustomPostLroRequestResponseHeaders { + @doc("Provides the 'Repeatability-*' headers to enable repeatable requests.") + parameters: CustomRepeatabilityRequestHeaders; + + @doc("Provides the 'Repeatability-Result' and 'Operation-Location' headers to support repeatability for POST LRO.") + response: CustomRepeatabilityResponseHeaders & + LongRunningOperationStatusLocationHeader; +} + +@doc(""" + Provides the 'Repeatability-*' headers to support repeatability for POST requests. + + TODO: Remove this customized model after upgrading to new csharp emitter + with fix for the following issue: https://github.com/Azure/autorest.csharp/issues/2970 + and use the existing "Azure.Core.RepeatabilityRequestHeaders" instead. + """) +model CustomRepeatabilityRequestHeaders { + @visibility("create", "update", "delete") + @header("Repeatability-Request-ID") + @doc("An opaque, globally-unique, client-generated string identifier for the request.") + repeatabilityRequestId?: string; + + @visibility("create", "update", "delete") + @doc("Specifies the date and time at which the request was first created.") + @header("Repeatability-First-Sent") + repeatabilityFirstSent?: zonedDateTime; + + @visibility("create", "update", "delete") + @doc("An opaque, globally-unique, client-generated string identifier for the client.") + @header("Repeatability-Client-ID") + repeatabilityClientId?: string; +} diff --git a/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml b/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml new file mode 100644 index 00000000000..659f4a7220a --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml @@ -0,0 +1,29 @@ +# Custom parameters for ADP Core project +# Allows composition of the output directory for each emitter +parameters: + api-kind: + default: "data-plane" + api-version-kind: + default: "preview" + api-namespace: + default: "Adp.Shared" + +output-dir: "{project-root}" + +emit: + - "@azure-tools/cadl-autorest" + - "@azure-tools/cadl-csharp" + +options: + "@azure-tools/cadl-autorest": + emitter-output-dir: "{output-dir}/../{api-kind}/{api-namespace}/{api-version-kind}" + output-file: adp-shared-api.json + examples-directory: ./examples + + "@azure-tools/cadl-csharp": + emitter-output-dir: "{output-dir}/../../../../../clients/Shared/Clients.Shared.vDraftCompliant" + library-name: "Azure.Adp.Clients.Shared.vDraftCompliant" + namespace: "Microsoft.Azure.Adp.Clients.Shared.vDraftCompliant" + clear-output-folder: true + new-project: false + model-namespace: true diff --git a/packages/cadl-python/adp/Adp.Shared/classification/main.cadl b/packages/cadl-python/adp/Adp.Shared/classification/main.cadl new file mode 100644 index 00000000000..c3cbbf1b4dd --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/classification/main.cadl @@ -0,0 +1,2 @@ +import "../main.cadl"; +import "./models.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/classification/models.cadl b/packages/cadl-python/adp/Adp.Shared/classification/models.cadl new file mode 100644 index 00000000000..7c1e3fe1bdc --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/classification/models.cadl @@ -0,0 +1,31 @@ +using Cadl.Http; +using Azure.Core; + +namespace Adp; + +@doc("Classification resource.") +model Classification { + @doc("Classification schema name.") + @key + @minLength(1) + @maxLength(256) + schemaName: string; + + @doc("Classification object model (JSON as string)") + @visibility("read", "create") + @minLength(2) + classificationObject: string; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("Represents sample classification parameters.") +model ClassificationQueryParameters { + ...Foundations.CollectionKeysOf; + + @doc("Classification schema name.") + @key + @path + @minLength(1) + @maxLength(256) + schemaName: string; +} diff --git a/packages/cadl-python/adp/Adp.Shared/client.cadl b/packages/cadl-python/adp/Adp.Shared/client.cadl new file mode 100644 index 00000000000..7f3de57c18a --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/client.cadl @@ -0,0 +1,6 @@ +import "@cadl-lang/rest"; +import "@cadl-lang/openapi"; +import "@azure-tools/cadl-autorest"; +import "@azure-tools/cadl-azure-core"; + +import "./main.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/common.cadl b/packages/cadl-python/adp/Adp.Shared/common.cadl new file mode 100644 index 00000000000..c67e37d01a5 --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/common.cadl @@ -0,0 +1,5 @@ +import "./models.cadl"; +import "./operations.cadl"; +import "./classification/models.cadl"; + +import "./azure-core-foundations-extensions.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json b/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json new file mode 100644 index 00000000000..f55e5d6389e --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json @@ -0,0 +1,37 @@ +{ + "operationId": "LongRunningOperations_GetStatus", + "title": "Get status of the long running operation. (LRO)", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "headers": { + "Retry-After": 5 + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000001", + "status": "Failed", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Adp.Shared/main.cadl b/packages/cadl-python/adp/Adp.Shared/main.cadl new file mode 100644 index 00000000000..7bef8b1de7a --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/main.cadl @@ -0,0 +1,20 @@ +import "./common.cadl"; + +using Cadl.Http; +using Cadl.Versioning; + +@versioned(Adp.Versions) +@versionedDependency( + [ + [ + Adp.Versions.v2023_00_00_for_public_preview, + Azure.Core.Versions.v1_0_Preview_1 + ] + ] +) +@service({ + title: "Adp", + version: "2023-00-00-preview", +}) +@useAuth(OAuth2Auth<[ImplicitAuthorizationFlow]>) +namespace Adp.Shared; diff --git a/packages/cadl-python/adp/Adp.Shared/models.cadl b/packages/cadl-python/adp/Adp.Shared/models.cadl new file mode 100644 index 00000000000..5c715eafe8b --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/models.cadl @@ -0,0 +1,167 @@ +using Cadl.Http; +using Cadl.Rest; +using Cadl.Versioning; +using Azure.Core; + +@versioned(Adp.Versions) +@versionedDependency( + [ + [ + Adp.Versions.v2023_00_00_for_public_preview, + Azure.Core.Versions.v1_0_Preview_1 + ] + ] +) +namespace Adp; + +enum Versions { + v2023_00_00_for_public_preview: "2023-00-00-preview", +} + +enum SharedClients { + LongRunningOperationsClient, +} + +@doc("Internal - generic Key/Value model for internal use") +model CommonKeyValuePair { + @doc("The key") + @key + key: string; + + @doc("The value") + value: string; +} + +@doc("Internal - the model for internal use") +model CommonResourceEndpoint { + @doc("The endpoint uri of the owning resource") + @visibility("read") + resourceEndpoint?: url; +} + +@doc("File upload information") +model FileUploadInformation { + @doc("File name specified by the client") + @key + clientFileName: string; + ...FileLocation; +} + +@doc("File location.") +model FileLocation { + @doc(""" + SAS signed URI for uploading (write) file to Azure Storage. + This URI expires in 24 hours. + """) + fileUri: url; +} + +@doc("Error code header.") +model XmsErrorCodeHeader { + @doc("Error code for specific error that occurred.") + @header("x-ms-error-code") + xmsErrorCode: string; +} + +@doc("Azure Active Directory OAuth2 Flow") +model ImplicitAuthorizationFlow { + @doc("Use implicit authorization flow type") + type: OAuth2FlowType.implicit; + + @doc("Authorization URL") + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize"; + + @doc("ADP Scope: impersonate user account") + scopes: ["https://adp.azure.com/.default"]; +} + +@doc("A long running operation resource.") +@resource("operations") +model LongRunningOperation { + @key("operationId") + @doc("The unique ID of the operation.") + @minLength(1) + @maxLength(36) + operationId: string; + ...LongRunningOperationBase; +} + +@doc("Standard Azure LRO response headers.") +model LongRunningOperationWithResponseHeaders { + ...LongRunningOperation; + ...Foundations.RetryAfterHeader; + ...LongRunningOperationResultLocation; +} + +@doc("The long running operation status monitor location.") +model LongRunningOperationStatusLocationHeader { + @pollingLocation + @doc("The location for monitoring the operation status.") + @header("Operation-Location") + operationLocation: ResourceLocation; +} + +@doc("Final location of the operation result.") +model LongRunningOperationResultLocation { + @doc("Final location of the operation result.") + @finalLocation + @header("Location") + location?: url; +} + +@doc(""" +Client specific long running operation identifier. +This identifier will serve as idempotence key to ensure idempotensy of the long running operation. +""") +model LongRunningOperationIdHeader { + @doc("The long running operation identifier. Operation-Id should be valid UUID string.") + @format("uuid") + @header("operation-id") + operationId?: string; +} + +@doc("The ARM resource identifier. The ARM Id could be used for checking access permission to the operations associated with that resource.") +model ArmResourceId { + @doc("The ARM resource identifier. The ARM Id could be used for checking access permission to the operations associated with that resource.") + @visibility("read", "create") + armResourceId?: string; +} + +@doc("The long running operation model without the key.") +model LongRunningOperationBase { + @doc("The operation status.") + @visibility("read", "update") + status: LongRunningOperationStatus; + + @doc("The operation error.") + @visibility("update") + error?: TStatusError; + + @doc("Final result location (URL).") + @visibility("read", "update", "create") + finalResultLocation: url; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("The long running operation response") +model LongRunningOperationResponse { + @doc("The operation Id.") + @minLength(1) + @maxLength(36) + operationId: string; + ...LongRunningOperationBase; +} + +@doc("The async operation status") +enum LongRunningOperationStatus { + Created, + InProgress, + Succeeded, + Failed, + Canceled, +} + +@doc("[Internal] Static identifier used by singleton resources.") +enum SingletonIdentifier { + current, +} diff --git a/packages/cadl-python/adp/Adp.Shared/operations.cadl b/packages/cadl-python/adp/Adp.Shared/operations.cadl new file mode 100644 index 00000000000..9413c5a659c --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/operations.cadl @@ -0,0 +1,12 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Autorest; + +namespace Adp.Shared; + +@tag("Long Running Operation") +interface LongRunningOperations { + @doc("Get the details of an LRO.") + getStatus is ResourceRead; +} diff --git a/packages/cadl-python/adp/Adp.Shared/package.json b/packages/cadl-python/adp/Adp.Shared/package.json new file mode 100644 index 00000000000..622c3c855e0 --- /dev/null +++ b/packages/cadl-python/adp/Adp.Shared/package.json @@ -0,0 +1,44 @@ +{ + "name": "@cadl-api-spec/adp-shared", + "version": "0.1.0", + "description": "ADP Shared API", + "private": true, + "main": "index.js", + "cadlMain": "client.cadl", + "config": { + "verbose": " -Verbose", + "OutputDirectory": "../data-plane/Adp.Shared", + "OutputFile": "preview/2023-00-00-preview/adp-shared-api.json", + "ClientPath": "../../../../../clients/Shared/Clients.Shared.vDraftCompliant", + "ClientNamespace": "Microsoft.Azure.Adp.Shared.Clients.vDraftCompliant", + "PublishOutputFileName": "../../../../draftcompliant/apispec.core.shared.2022-11-30-draftcompliant.json", + "AutorestManifestFile": "../src/scripts/autorest.md" + }, + "scripts": { + "lint": "cadl compile . --warn-as-error --import @cadl-lang/library-linter --no-emit", + "validate": "npm run _validateOpenApiSpec && npm run _validateExamples", + "build": "npm run format && npx cadl compile . && npm run validate", + "publish": "pwsh ../src/scripts/publish.ps1 %npm_package_config_verbose% -SourceOpenApiSpecPath %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile% -OutputOpenApiSpecPath %npm_package_config_PublishOutputFileName%", + "_generateAutorestClient": "pwsh ../src/scripts/generate-autorest-client.ps1 -InputOpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile% -OutputPath %npm_package_configClientPath%/generated -Namespace %npm_package_configClientNamespace% -AutorestManifestFile %npm_package_config_AutorestManifestFile%", + "_validateOpenApiSpec": "pwsh ../src/scripts/validate-spec.ps1 -OpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile%", + "_validateExamples": "pwsh ../src/scripts/validate-examples.ps1 -OpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile%", + "format": "npx cadl format --pretty ./**/*.cadl" + }, + "keywords": [], + "author": "Microsoft Corporation", + "license": "MIT", + "devDependencies": { + "@cadl-lang/openapi": "~0.38.0", + "@cadl-lang/openapi3": "~0.38.0", + "@cadl-lang/rest": "0.38.0", + "@cadl-lang/versioning": "~0.38.0", + "@azure-tools/cadl-autorest": "~0.24.0", + "@azure-tools/cadl-azure-core": "~0.24.0", + "@cadl-lang/compiler": "0.38.5", + "@azure-tools/cadl-dpg": "~0.24.0", + "@azure-tools/cadl-csharp": "0.1.11-beta.20221229.1", + "avocado": "1.0.0", + "prettier": "^2.7.1", + "@cadl-lang/library-linter": "~0.38.0" + } +} diff --git a/packages/cadl-python/adp/Core/.prettierrc b/packages/cadl-python/adp/Core/.prettierrc new file mode 100644 index 00000000000..33160e62e6c --- /dev/null +++ b/packages/cadl-python/adp/Core/.prettierrc @@ -0,0 +1,32 @@ +{ + "overrides": [ + { + "files": [ + "specification/**/*.json", + "documentation/swagger-bootstrap.json", + "documentation/samplefiles/**/*.json" + ], + "options": { + "plugins": [ + "./src/scripts/prettier-swagger-plugin.ts" + ], + "parser": "json-swagger", + "printWidth": 20, + "endOfLine": "auto" + } + }, + { + "files": [ + "**/*.json" + ], + "options": { + "parser": "json", + "printWidth": 20, + "endOfLine": "auto" + }, + "excludeFiles": [ + "specification/**/*.json" + ] + } + ] +} diff --git a/packages/cadl-python/adp/Core/cadl-project.yaml b/packages/cadl-python/adp/Core/cadl-project.yaml new file mode 100644 index 00000000000..cba046773b4 --- /dev/null +++ b/packages/cadl-python/adp/Core/cadl-project.yaml @@ -0,0 +1,23 @@ +# Custom parameters for ADP Core project +# Allows composition of the output directory for each emitter +parameters: + api-kind: + default: "data-plane" + api-version-kind: + default: "preview" + api-namespace: + default: "Adp.Core" + +output-dir: "{project-root}" + +emit: + - "@azure-tools/cadl-csharp" + +options: + "@azure-tools/cadl-csharp": + emitter-output-dir: "sdk/adp/Azure.Adp.Clients.Core.vDraftCompliant/src" + library-name: "Azure.Adp.Clients.Core.vDraftCompliant" + namespace: "Microsoft.Azure.Adp.Clients.Core.vDraftCompliant" + clear-output-folder: true + new-project: false + model-namespace: true diff --git a/packages/cadl-python/adp/Core/cadl.md b/packages/cadl-python/adp/Core/cadl.md new file mode 100644 index 00000000000..9500b2405b0 --- /dev/null +++ b/packages/cadl-python/adp/Core/cadl.md @@ -0,0 +1,22 @@ +# ADP data plane API CADL project + +## Overview + +This CADL project used to define API specs for Autonomous Development Platform (ADP) services. + +## Generating API Specs + +1. Run `npm install` to install required NPM packages. +1. Run `npm run` to see available targets. +1. Run desired target using `npm run ` command. + +## Authoring CADL + +- [Installing VS Code Extension](https://github.com/microsoft/cadl#installing-vs-code-extension) +- [Cadl Language Tour](https://github.com/microsoft/cadl/blob/main/docs/tutorial.md) +- [Repository Guidelines for Cadl Specs](https://github.com/Azure/azure-rest-api-specs-pr/blob/main/documentation/cadl-structure-guidelines.md) + +## Dependencies + +- [Microsft/Cadl](https://github.com/microsoft/cadl) - A repo which defines the cadl compiler and core language constructs. +- [Azure/cadl-azure](https://github.com/Azure/cadl-azure) - A repo which defines common Azure-specific Cadl libraries. diff --git a/packages/cadl-python/adp/Core/classification/main.cadl b/packages/cadl-python/adp/Core/classification/main.cadl new file mode 100644 index 00000000000..2259c5330c2 --- /dev/null +++ b/packages/cadl-python/adp/Core/classification/main.cadl @@ -0,0 +1,5 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; + +// Consider moving classifications to Adp.Shared library diff --git a/packages/cadl-python/adp/Core/classification/models.cadl b/packages/cadl-python/adp/Core/classification/models.cadl new file mode 100644 index 00000000000..4331c7e8e94 --- /dev/null +++ b/packages/cadl-python/adp/Core/classification/models.cadl @@ -0,0 +1,37 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; + +namespace Adp.Core.ClassificationSchema; + +enum ClassificationSchemaClients { + ClassificationSchemaClient, +} + +@doc("Classification schema identifier.") +model ClassificationSchemaIdentifier { + @doc("Classification schema identifier.") + @key + @minLength(1) + @maxLength(256) + name: string; +} + +@doc("Classification schema resource model.") +@resource("classificationSchemas") +model ClassificationSchema { + ...ClassificationSchemaIdentifier; + + @doc("Classification schema definition (JSON schema as string).") + @visibility("read", "create") + @minLength(2) + schemaDefinition: string; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("{name} resource creation parameters.", ClassificationSchema) +@withVisibility("create") +@withoutOmittedProperties("name") +model ClassificationSchemaCreationParameters { + ...ClassificationSchema; +} diff --git a/packages/cadl-python/adp/Core/classification/operations.cadl b/packages/cadl-python/adp/Core/classification/operations.cadl new file mode 100644 index 00000000000..ed937af3bc2 --- /dev/null +++ b/packages/cadl-python/adp/Core/classification/operations.cadl @@ -0,0 +1,36 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.ClassificationSchema; + +@tag("Classification Schema") +interface ClassificationSchemaOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource read operation." + @doc("Get classification schema by name.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO POST action for creating resources." + @doc("Creates new classification schema.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + create is CustomLongRunningResourceCreateUsingHttpPost< + ClassificationSchema, + CustomBodyWrapper + >; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO DELETE action for deleting resources." + @doc("Deletes the classification schema and all related classification assignments (instances).") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + delete is CustomLongRunningResourceDelete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("List all classification schemas.") + getAll is CustomResourceList; +} diff --git a/packages/cadl-python/adp/Core/client.cadl b/packages/cadl-python/adp/Core/client.cadl new file mode 100644 index 00000000000..2eef1a90ed8 --- /dev/null +++ b/packages/cadl-python/adp/Core/client.cadl @@ -0,0 +1,276 @@ +import "@cadl-lang/rest"; +import "@cadl-lang/openapi"; +import "@azure-tools/cadl-autorest"; +import "@azure-tools/cadl-azure-core"; +import "@azure-tools/cadl-dpg"; + +import "./main.cadl"; + +using Azure.DPG; +using Cadl.Rest.Private; + +namespace Adp.Sdk.DotNet.Core { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @client({ + name: "CoreClient", + service: Adp.Core, + }) + interface Core + extends Adp.Sdk.DotNet.Internal.LongRunningOperation, + Adp.Sdk.DotNet.Internal.Discovery, + Adp.Sdk.DotNet.Internal.Upload, + Adp.Sdk.DotNet.Internal.ClassificationSchema, + Adp.Sdk.DotNet.Internal.Measurement, + Adp.Sdk.DotNet.Internal.MeasurementClassification, + Adp.Sdk.DotNet.Internal.DataStream, + Adp.Sdk.DotNet.Internal.DataStreamClassification {} +} + +namespace Adp.Sdk.DotNet.Internal { + interface LongRunningOperation { + @convenienceAPI + getLongRunning is Adp.Shared.LongRunningOperations.getStatus; + } + + interface ClassificationSchema { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.create; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + deleteClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.delete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getClassificationSchemas is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.getAll; + } + + interface Discovery { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createOrReplaceDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.createOrReplace; + + @convenienceAPI + getDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("complete") + completeDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.complete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("cancel") + cancelDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.cancel; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("listWritableUris") + getDiscoverySpecialFileUploadLocations is Adp.Core.Ingestion.Discovery.DiscoverySpecialFileOperations.listWritableUris; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("generate") + generateDiscoverySpecialFileUploadLocations is Adp.Core.Ingestion.Discovery.DiscoverySpecialFileOperations.generate; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getAllDiscoveryUploads is Adp.Core.Ingestion.Discovery.DiscoveryResultUploadOperations.list; + } + + interface Upload { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createOrReplaceUpload is Adp.Core.Ingestion.Upload.UploadOperations.createOrReplace; + + @convenienceAPI + getUpload is Adp.Core.Ingestion.Upload.UploadOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("complete") + completeUpload is Adp.Core.Ingestion.Upload.UploadOperations.complete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("cancel") + cancelUpload is Adp.Core.Ingestion.Upload.UploadOperations.cancel; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("generate") + generateUploadSpecialFiles is Adp.Core.Ingestion.Upload.UploadSpecialFileOperations.generate; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("listWritableUris") + getUploadSpecialFiles is Adp.Core.Ingestion.Upload.UploadSpecialFileOperations.listWritableUris; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("generate") + generateUploadDataFiles is Adp.Core.Ingestion.Upload.UploadDataFileOperations.generate; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("listWritableUris") + getUploadDataFiles is Adp.Core.Ingestion.Upload.UploadDataFileOperations.listWritableUris; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + listMeasurements is Adp.Core.Ingestion.Upload.UploadResultMeasurementOperations.getAll; + } + + interface Measurement { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurement is Adp.Core.Measurement.MeasurementOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + deleteMeasurement is Adp.Core.Measurement.MeasurementOperations.delete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurements is Adp.Core.Measurement.MeasurementOperations.getAll; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("queryMeasurementsWithMetadata") + getMeasurementsWithMetadata is Adp.Core.Measurement.MeasurementOperations.queryMeasurementsWithMetadata; + + @convenienceAPI + @actionSegment("findByIds") + getMeasurementsByIds is Adp.Core.Measurement.MeasurementOperations.findByIds; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementMetadata is Adp.Core.Measurement.MeasurementMetadataOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementProcessingResults is Adp.Core.Measurement.MeasurementProcessingResultsOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementStateMachine is Adp.Core.Measurement.MeasurementStateMachineOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementStateMachines is Adp.Core.Measurement.MeasurementStateMachineOperations.getAll; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("act") + actMeasurementStateMachine is Adp.Core.Measurement.MeasurementStateMachineOperations.act; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementMetadataSchemaFileInfo is Adp.Core.Measurement.MeasurementMetadataSchemaFileInfoOperations.get; + } + + interface MeasurementClassification { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getMeasurementClassifications is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.getAll; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + deleteMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.delete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.create; + } + + interface DataStream { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createDataStream is Adp.Core.DataStream.DataStreamOperations.create; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getDataStream is Adp.Core.DataStream.DataStreamOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getAllDataStream is Adp.Core.DataStream.DataStreamOperations.getAll; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("clearContent") + clearContentOfDataStream is Adp.Core.DataStream.DataStreamOperations.clearContent; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("stageFiles") + stageFilesForDataStream is Adp.Core.DataStream.DataStreamOperations.stageFiles; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("complete") + completeDataStream is Adp.Core.DataStream.DataStreamOperations.complete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("fail") + failDataStream is Adp.Core.DataStream.DataStreamOperations.fail; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("findByTags") + getDataStreamsByTags is Adp.Core.DataStream.DataStreamOperations.findByTags; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("findByLineage") + getDataStreamsByLineage is Adp.Core.DataStream.DataStreamOperations.findByLineage; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("getLineageGraphsByLineage") + getDataStreamLineageGraphsByLineage is Adp.Core.DataStream.DataStreamOperations.getLineageGraphsByLineage; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createOrReplaceDataStreamStorage is Adp.Core.DataStream.DataStreamStorageOperations.createOrReplace; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("getWithWritableUris") + getDataStreamStorage is Adp.Core.DataStream.DataStreamStorageOperations.getWithWritableUris; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + createOrReplaceDataStreamTags is Adp.Core.DataStream.DataStreamTagsOperations.createOrReplace; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getDataStreamTags is Adp.Core.DataStream.DataStreamTagsOperations.get; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("generate") + generateDataStreamFiles is Adp.Core.DataStream.DataStreamFileOperations.generate; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + getDataStreamFiles is Adp.Core.DataStream.DataStreamFileOperations.getAll; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @convenienceAPI + @actionSegment("getWritableUri") + getDataStreamLogsContainerLocation is Adp.Core.DataStream.DataStreamLogsContainerOperations.getWritableUri; + } + + interface DataStreamClassification {} +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json new file mode 100644 index 00000000000..80d2b5fdf30 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json @@ -0,0 +1,47 @@ +{ + "operationId": "ClassificationSchemaOperations_Create", + "title": "Create a classification schema resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "00000000-0000-0000-0000-000000000123", + "name": "unique_schema_name", + "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}" + }, + "responses": { + "200": { + "body": { + "name": "unique_schema_name", + "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", + "etag": "string" + } + }, + "202": { + "headers": { + "Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "Operation-Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000123", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json new file mode 100644 index 00000000000..311d45b633b --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json @@ -0,0 +1,39 @@ +{ + "operationId": "ClassificationSchemaOperations_Delete", + "title": "Delete the classification schema resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "name": "unique_name" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000123", + "status": "Deleted", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json new file mode 100644 index 00000000000..7ddf1426f15 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json @@ -0,0 +1,27 @@ +{ + "operationId": "ClassificationSchemaOperations_Get", + "title": "Get classification schema definition by schema name.", + "parameters": { + "api-version": "2023-00-00-preview", + "name": "classification_schema_1" + }, + "responses": { + "200": { + "body": { + "name": "classification_schema_1", + "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json new file mode 100644 index 00000000000..ed02c891046 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json @@ -0,0 +1,41 @@ +{ + "operationId": "ClassificationSchemaOperations_GetAll", + "title": "List classification schemas. Supports paging.", + "parameters": { + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "classification_schema_1", + "schemaDefinition": "{\"description\": \"Classification schema definition 1 (JSON schema as string).\"}", + "etag": "0x1" + }, + { + "name": "classification_schema_2", + "schemaDefinition": "{\"description\": \"Classification schema definition 2 (JSON schema as string).\"}", + "etag": "0x2" + }, + { + "name": "classification_schema_3", + "schemaDefinition": "{\"description\": \"Classification schema definition 3 (JSON schema as string).\"}", + "etag": "0x3" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json new file mode 100644 index 00000000000..2e15cb5bf66 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json @@ -0,0 +1,42 @@ +{ + "operationId": "CreateSample", + "title": "Create Sample resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "client-operation-id", + "resource": { + "id": "00000000-0000-0000-0000-000000000001", + "state": "Inactive", + "labels": [ + "some", + "labels" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000001", + "state": "Inactive", + "labels": [ + "some", + "labels" + ] + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json new file mode 100644 index 00000000000..16b35d1cf87 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json @@ -0,0 +1,34 @@ +{ + "operationId": "CreateSampleClassification", + "title": "Create classification schema instance for specific sample resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "client-operation-id", + "sampleId": "00000000-0000-0000-0000-000000000001", + "schemaName": "unique_name", + "classificationObject": "{\n \"record_country\": \"Israel\",\n \"record_city\": \"Tel-Aviv\",\n \"record_date\": \"2020-07-05T14:14:24.2695988+03:00\"\n}" + }, + "responses": { + "200": { + "body": { + "schemaName": "unique_name", + "classificationObject": "{\n \"record_country\": \"Israel\",\n \"record_city\": \"Tel-Aviv\",\n \"record_date\": \"2020-07-05T14:14:24.2695988+03:00\"\n}", + "eTag": "some_SHA256_hash" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json new file mode 100644 index 00000000000..1cfeb5935c8 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json @@ -0,0 +1,54 @@ +{ + "operationId": "DataStreamClassificationOperations_Create", + "title": "Assigns the classification to the data-stream.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123", + "body": { + "schemaName": "zd", + "classificationObject": "iqdtdovlqjqwemyxvl" + } + }, + "responses": { + "200": { + "body": { + "schemaName": "some-schema", + "classificationObject": "{'some': 'json'}", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json new file mode 100644 index 00000000000..4d20364017a --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json @@ -0,0 +1,45 @@ +{ + "operationId": "DataStreamClassificationOperations_Delete", + "title": "Unassign the classification from the data-stream.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "schemaName": "xifyvslnwbimtlsoapwjsmtnnvtczkdnivhuaszbwvazvycpdpxtijfhifvkxvewpanrakjgdizkzprqoxhnwpaweislowuwlgieklyzjvgbmojpoycleeoqmyzyoehusfrznywshreimdqsybjpgjsptojrfckttartckelypetcvnccpafpzf", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + }, + "204": {}, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json new file mode 100644 index 00000000000..30414ea9d1b --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "DataStreamClassificationOperations_Get", + "title": "Get classification by schema name.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "schemaName": "some-schema", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "schemaName": "some-schema", + "classificationObject": "{'some': 'json'}", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json new file mode 100644 index 00000000000..8cdb16afd2d --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json @@ -0,0 +1,33 @@ +{ + "operationId": "DataStreamClassificationOperations_GetAll", + "title": "Lists the classifications assigned to the data-stream.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "schemaName": "some-schema", + "classificationObject": "{'some': 'json'}", + "etag": "string" + } + ], + "nextLink": "https://microsoft.com/a" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json new file mode 100644 index 00000000000..9e9d8b1cb20 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json @@ -0,0 +1,38 @@ +{ + "operationId": "DataStreamFileOperations_Generate", + "title": "Initiates the process of generating SAS signed URIs for accessing the data-stream files.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "operation-id": "00000000-0000-0000-0000-000000000123", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "clientFileName": "foo.dat", + "fileUri": "https://some-workspace/manifest.json", + "externalTimeStamp": "2022-10-26T06:20:36.367Z", + "size": 27 + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json new file mode 100644 index 00000000000..08b6f90e65a --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataStreamFileOperations_GetAll", + "title": "Returns SAS signed URIs for reading special files from Azure Storage.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "foo.dat", + "fileUri": "https://some-storage-account/path-to/foo.dat", + "externalTimeStamp": "2022-10-26T06:20:36.367Z", + "size": 27 + } + ], + "nextLink": "https://microsoft.com/a" + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json new file mode 100644 index 00000000000..7e280977072 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataStreamLogsContainerOperations_GetWritableUri", + "title": "Returns SAS signed URI of the data-stream logs folder that allow uploading log files to Azure Storage.\nThe SAS token expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "logFolderUri": "https://some-storage-account/some-path/logs" + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json new file mode 100644 index 00000000000..a7eeaa61170 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json @@ -0,0 +1,55 @@ +{ + "operationId": "DataStreamOperations_ClearContent", + "title": "Clear the data-stream content.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "some source id", + "channels": [ + "some channel" + ] + } + ] + }, + "status": "Cleared", + "type": "System", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000123", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json new file mode 100644 index 00000000000..6bc86ea04d1 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json @@ -0,0 +1,65 @@ +{ + "operationId": "DataStreamOperations_Complete", + "title": "Marks a data stream as completed", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", + "channels": [ + "audio" + ] + } + ] + }, + "status": "Completed", + "type": "Raw", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json new file mode 100644 index 00000000000..b3d9cb65efa --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json @@ -0,0 +1,79 @@ +{ + "operationId": "DataStreamOperations_Create", + "title": "Creates new data-stream resource.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123", + "body": { + "lineage": { + "producerMetadata": { + "key3673": "ubarvd" + }, + "inputs": [ + { + "sourceDataStreamId": "dyskkgbidtjjpvldsddght", + "channels": [ + "ncjmpikffluh" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "some source id", + "channels": [ + "some channel" + ] + } + ] + }, + "status": "Created", + "type": "System", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json new file mode 100644 index 00000000000..08595e634ad --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json @@ -0,0 +1,65 @@ +{ + "operationId": "DataStreamOperations_Fail", + "title": "Marks a data stream as failed", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", + "channels": [ + "audio" + ] + } + ] + }, + "status": "Failed", + "type": "Raw", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [], + "innererror": { + "code": "kc" + } + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json new file mode 100644 index 00000000000..ba8af32a128 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json @@ -0,0 +1,64 @@ +{ + "operationId": "DataStreamOperations_FindByLineage", + "title": "Lists the data-streams by lineage.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "body": { + "lineage": { + "producerMetadata": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "inputs": [ + { + "sourceDataStreamId": "string", + "channels": [ + "string" + ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "dataStreamId": "00000000-0000-0000-0000-000000000008", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", + "channels": [ + "video" + ] + } + ] + }, + "status": "Created", + "type": "Derived", + "etag": "string" + } + ], + "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json new file mode 100644 index 00000000000..7f00a1f3248 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json @@ -0,0 +1,54 @@ +{ + "operationId": "DataStreamOperations_FindByTags", + "title": "Lists the data-streams by tags.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "body": { + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "dataStreamId": "00000000-0000-0000-0000-000000000008", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", + "channels": [ + "video" + ] + } + ] + }, + "status": "Created", + "type": "Derived", + "etag": "string" + } + ], + "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json new file mode 100644 index 00000000000..96ebd0d3b6b --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json @@ -0,0 +1,43 @@ +{ + "operationId": "DataStreamOperations_Get", + "title": "Get data-stream by identifier.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", + "channels": [ + "audio" + ] + } + ] + }, + "status": "Created", + "type": "System", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json new file mode 100644 index 00000000000..fe4a33d37c4 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json @@ -0,0 +1,67 @@ +{ + "operationId": "DataStreamOperations_GetAll", + "title": "Lists the existing data-streams.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", + "channels": [ + "audio" + ] + } + ] + }, + "status": "Created", + "type": "System", + "etag": "string" + }, + { + "dataStreamId": "00000000-0000-0000-0000-000000000006", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", + "channels": [ + "audio" + ] + } + ] + }, + "status": "Created", + "type": "System", + "etag": "string" + } + ], + "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json new file mode 100644 index 00000000000..fbd71013448 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json @@ -0,0 +1,73 @@ +{ + "operationId": "DataStreamOperations_GetLineageGraphsByLineage", + "title": "Lists the data-streams by lineage graph.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "body": { + "processingObjects": [ + { + "metadata": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "id": "string" + } + ], + "edges": [ + { + "sourceId": "string", + "targetId": "string" + } + ] + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "dataStreamsGraphs": [ + { + "dataStreamByProcessingObjectId": { + "key7260": { + "dataStreamId": "00000000-0000-0000-0000-000000000008", + "resourceEndpoint": "https://some-workspace/some-resource", + "lineage": { + "producerMetadata": { + "some-key": "some-value" + }, + "inputs": [ + { + "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", + "channels": [ + "video" + ] + } + ] + }, + "status": "Created", + "type": "Derived", + "etag": "string" + } + } + } + ] + } + ], + "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json new file mode 100644 index 00000000000..71039a8ccf5 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json @@ -0,0 +1,39 @@ +{ + "operationId": "DataStreamOperations_StageFiles", + "title": "Shards files to be uploaded to the data-stream and returns SAS-signed upload URIs for each of them.\nThis URI expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "body": { + "files": [ + { + "clientFileName": "ygavrlnfhupasaus", + "recordingTimestampUtc": "2022-10-26T08:22:08.349Z" + } + ] + } + }, + "responses": { + "200": { + "body": { + "files": [ + { + "clientFileName": "some-file.dat", + "fileUri": "https://storage-account/path/some-file.dat" + } + ] + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json new file mode 100644 index 00000000000..1b5a34214a8 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json @@ -0,0 +1,69 @@ +{ + "operationId": "DataStreamStorageOperations_CreateOrReplace", + "title": "Create or replace storage information of the data-stream.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "body": { + "type": "shardedStorage", + "rollingInformation": { + "strategy": "Time", + "unit": "Seconds", + "value": 0 + } + } + }, + "responses": { + "200": { + "body": { + "id": "current", + "type": "shardedStorage", + "rollingInformation": { + "strategy": "Time", + "unit": "Seconds", + "value": 0 + }, + "manifestUri": "https://storage-account/path-to-manifest/manifest.json", + "dataFolderUri": "https://storage-account/path-to-data-folder", + "shards": [ + { + "shardFolderUri": "https://storage-account/path-to-shard", + "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" + } + ], + "etag": "string" + } + }, + "201": { + "body": { + "id": "current", + "type": "shardedStorage", + "rollingInformation": { + "strategy": "Time", + "unit": "Seconds", + "value": 0 + }, + "manifestUri": "https://storage-account/path-to-manifest/manifest.json", + "dataFolderUri": "https://storage-account/path-to-data-folder", + "shards": [ + { + "shardFolderUri": "https://storage-account/path-to-shard", + "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" + } + ], + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json new file mode 100644 index 00000000000..3aaa0c8b21c --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json @@ -0,0 +1,40 @@ +{ + "operationId": "DataStreamStorageOperations_Get", + "title": "Returns the data-stream storage resource with SAS signed URIs that allow reading from Azure Storage.\nThe SAS token expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "type": "shardedStorage", + "rollingInformation": { + "strategy": "Time", + "unit": "Seconds", + "value": 0 + }, + "manifestUri": "https://storage-account/path-to-manifest/manifest.json", + "dataFolderUri": "https://storage-account/path-to-data-folder", + "shards": [ + { + "shardFolderUri": "https://storage-account/path-to-shard", + "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" + } + ], + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json new file mode 100644 index 00000000000..2a12bd341ee --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json @@ -0,0 +1,40 @@ +{ + "operationId": "DataStreamStorageOperations_GetWithWritableUris", + "title": "Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage.\nThe SAS token expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "type": "shardedStorage", + "rollingInformation": { + "strategy": "Time", + "unit": "Seconds", + "value": 0 + }, + "manifestUri": "https://storage-account/path-to-manifest/manifest.json", + "dataFolderUri": "https://storage-account/path-to-data-folder", + "shards": [ + { + "shardFolderUri": "https://storage-account/path-to-shard", + "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" + } + ], + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json new file mode 100644 index 00000000000..6ae2841f811 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json @@ -0,0 +1,39 @@ +{ + "operationId": "DataStreamTagsOperations_CreateOrReplace", + "title": "Create or replace all tags at once.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "api-version": "2023-00-00-preview", + "body": { + "tags": [ + { + "key": "foo", + "value": "foo" + } + ] + } + }, + "responses": { + "200": { + "body": { + "tags": [ + { + "key": "foo", + "value": "foo" + } + ] + } + }, + "201": { + "body": { + "tags": [ + { + "key": "foo", + "value": "foo" + } + ] + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json new file mode 100644 index 00000000000..93c862bf3c3 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataStreamTagsOperations_Get", + "title": "Returns set of the data-stream tags.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "dataStreamId": "00000000-0000-0000-0000-000000000005", + "id": "current", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "id": "current", + "tags": [ + { + "key": "bar", + "value": "bar" + } + ] + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json new file mode 100644 index 00000000000..b96153623f6 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json @@ -0,0 +1,25 @@ +{ + "operationId": "DeleteSample", + "title": "Delete the Sample resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json new file mode 100644 index 00000000000..6a35c473862 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeleteSampleClassification", + "title": "Delete the Classification assignment from specific sample resource using long-running operation (LRO).", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "00000000-0000-0000-0000-000000000001", + "schemaName": "unique_name" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json new file mode 100644 index 00000000000..65d7b2450d2 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json @@ -0,0 +1,48 @@ +{ + "operationId": "DiscoveryOperations_Cancel", + "title": "Initiates the process of cancelling the discovery.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string", + "manifestUri": "https://some-workspace/manifest.json", + "status": "Cancelled", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json new file mode 100644 index 00000000000..abf0a511663 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json @@ -0,0 +1,48 @@ +{ + "operationId": "DiscoveryOperations_Complete", + "title": "Initiates the process of completing the discovery and creating the file grouping manifest files.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string", + "manifestUri": "https://some-workspace/manifest.json", + "status": "Completed", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json new file mode 100644 index 00000000000..483c8218df1 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json @@ -0,0 +1,39 @@ +{ + "operationId": "DiscoveryOperations_CreateOrReplace", + "title": "Creates a new ingestion discovery instance.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string" + }, + "responses": { + "200": { + "body": { + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string", + "manifestUri": "https://some-workspace/manifest.json", + "status": "Created", + "etag": "string" + } + }, + "201": { + "body": { + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string", + "manifestUri": "https://some-workspace/manifest.json", + "status": "Created", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json new file mode 100644 index 00000000000..406dba0676a --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "DiscoveryOperations_Get", + "title": "Returns discovery by ID.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "body": { + "discoveryId": "00000000-0000-0000-0000-000000000001", + "externalPackageId": "string", + "manifestUri": "https://some-workspace/manifest.json", + "status": "Created", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json new file mode 100644 index 00000000000..e67203a8323 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json @@ -0,0 +1,38 @@ +{ + "operationId": "DiscoveryResultUploadOperations_List", + "title": "List upload detail for the discovery resource.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "operation-id": "string" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "uploadId": "00000000-0000-0000-0000-000000000002", + "manifestUri": "https://some-storage-account/path/manifest.json", + "resourceEndpoint": "https://some-workspace/some-resource" + }, + { + "uploadId": "00000000-0000-0000-0000-000000000003", + "manifestUri": "https://some-storage-account/path/manifest.json", + "resourceEndpoint": "https://some-workspace/some-resource" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json new file mode 100644 index 00000000000..673241a91f9 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json @@ -0,0 +1,44 @@ +{ + "operationId": "DiscoverySpecialFileOperations_Generate", + "title": "Initiates the process of generating SAS signed URIs for uploading special files for the discovery.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "body": { + "clientFileName": "file-1.ext", + "fileUri": "https://some-storage-account/path/special-file-1.ext" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json new file mode 100644 index 00000000000..84afc702e3a --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json @@ -0,0 +1,36 @@ +{ + "operationId": "DiscoverySpecialFileOperations_List", + "title": "List special files details for the discovery resource.\nReturns SAS signed URI that allows reading special files from Azure Storage.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "operation-id": "string" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://some-storage-account/path/special-file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://some-storage-account/path/special-file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json new file mode 100644 index 00000000000..4271884a42c --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json @@ -0,0 +1,36 @@ +{ + "operationId": "DiscoverySpecialFileOperations_ListWritableUris", + "title": "List special files details for the discovery resource.\nReturns SAS signed URI that allows uploading special files to Azure Storage.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "operation-id": "string" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://some-storage-account/path/special-file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://some-storage-account/path/special-file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json new file mode 100644 index 00000000000..45f104cf45d --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json @@ -0,0 +1,28 @@ +{ + "operationId": "GetSampleById", + "title": "Get specific Sample resource.", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000001", + "state": "Inactive", + "labels": [ + "some", + "labels" + ] + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json new file mode 100644 index 00000000000..5212edeec03 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json @@ -0,0 +1,26 @@ +{ + "operationId": "GetSampleClassification", + "title": "Get Classification by schema name for specific Sample resource.", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "00000000-0000-0000-0000-000000000001", + "schemaName": "sample_classification_schema_1" + }, + "responses": { + "200": { + "body": { + "schemaName": "sample_classification_schema_1", + "classificationObject": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", + "eTag": "some_SHA256_hash" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json new file mode 100644 index 00000000000..fd890ee2a21 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json @@ -0,0 +1,41 @@ +{ + "operationId": "ListSampleClassifications", + "title": "List classification instances for specific sample resource. Supports paging.", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "00000000-0000-0000-0000-000000000001", + "maxpagesize": 100 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "schemaName": "sample_classification_schema_1", + "classificationObject": "{\"key_1\": \"value_1\"}", + "eTag": "some_SHA256_hash" + }, + { + "schemaName": "sample_classification_schema_2", + "classificationObject": "{\"key_2\": \"value_2\"}", + "eTag": "some_SHA256_hash" + }, + { + "schemaName": "sample_classification_schema_3", + "classificationObject": "{\"key_3\": \"value_3\"}", + "eTag": "some_SHA256_hash" + } + ], + "nextLink": "link" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json new file mode 100644 index 00000000000..a394684c616 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json @@ -0,0 +1,46 @@ +{ + "operationId": "ListSamples", + "title": "List Sample resources. Supports paging.", + "parameters": { + "api-version": "2023-00-00-preview", + "maxpagesize": 100 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "1", + "state": "Inactive", + "labels": [ + "some", + "labels" + ] + }, + { + "id": "2", + "state": "Activating", + "labels": [ + "some", + "other", + "labels" + ] + }, + { + "id": "3", + "state": "Active" + } + ], + "nextLink": "link" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json new file mode 100644 index 00000000000..9f0cf3f4d8f --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json @@ -0,0 +1,37 @@ +{ + "operationId": "LongRunningOperationStatus", + "title": "Get status of the long running operation. (LRO)", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "headers": { + "Retry-After": 5 + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000001", + "status": "Failed", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json new file mode 100644 index 00000000000..9cba31243b6 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json @@ -0,0 +1,38 @@ +{ + "operationId": "LongRunningOperations_GetStatus", + "title": "Get status of the long running operation. (LRO)", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "headers": { + "Retry-After": 5 + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000001", + "status": "Failed", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "resultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-the-resource/resource-id?api-version=2023-00-00-preview", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json new file mode 100644 index 00000000000..7f9a20b9053 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json @@ -0,0 +1,48 @@ +{ + "operationId": "MeasurementClassificationOperations_Create", + "title": "Assigns classification to the measurement.", + "parameters": { + "api-version": "2023-00-00-preview", + "operationId": "client-operation-id", + "measurementId": "00000000-0000-0000-0000-000000000003", + "schemaName": "unique_schema_name", + "classificationObject": "{\"description\": \"Classification instance (JSON schema as string).\"}" + }, + "responses": { + "200": { + "body": { + "schemaName": "unique_schema_name", + "classificationObject": "{\"description\": \"Classification instance (JSON schema as string).\"}", + "etag": "string" + } + }, + "202": { + "headers": { + "Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", + "Operation-Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json new file mode 100644 index 00000000000..eeef294bf56 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json @@ -0,0 +1,40 @@ +{ + "operationId": "MeasurementClassificationOperations_Delete", + "title": "Unassign the classification from the measurement.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003", + "schemaName": "unique_schema_name" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json new file mode 100644 index 00000000000..1c268b791b1 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json @@ -0,0 +1,28 @@ +{ + "operationId": "MeasurementClassificationOperations_Get", + "title": "Get measurement classification by schema name.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "schemaName": "unique_schema_name", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "schemaName": "string", + "classificationObject": "string", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json new file mode 100644 index 00000000000..0996ff3b5dc --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json @@ -0,0 +1,32 @@ +{ + "operationId": "MeasurementClassificationOperations_GetAll", + "title": "List measurement classifications.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "schemaName": "string", + "classificationObject": "string", + "etag": "string" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json new file mode 100644 index 00000000000..41d525f0186 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json @@ -0,0 +1,47 @@ +{ + "operationId": "MeasurementMetadataFileInfoOperations_Complete", + "title": "Initiates a process that replaces the measurement's metadata file.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003", + "body": { + "pendingFileEtag": "string" + } + }, + "responses": { + "200": { + "body": { + "metadataFileName": "metadata.json", + "metadataFileUri": "https://some-storage-account/path/metadata.json" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json new file mode 100644 index 00000000000..b358f189255 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json @@ -0,0 +1,27 @@ +{ + "operationId": "MeasurementMetadataFileInfoOperations_Get", + "title": "Returns SAS signed URI to an existing metadata file with `read` permissions\nand the eTag of that file in response header.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003", + "intent": "write" + }, + "responses": { + "200": { + "body": { + "metadataFileName": "metadata.json", + "metadataFileUri": "https://some-storage-account/path/metadata.json" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json new file mode 100644 index 00000000000..fc2bb7bf639 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json @@ -0,0 +1,27 @@ +{ + "operationId": "MeasurementMetadataFileInfoOperations_GetWritableUri", + "title": "Returns SAS signed URI that allows uploading temporary measurement metadata file to Azure Storage.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003", + "intent": "write" + }, + "responses": { + "200": { + "body": { + "metadataFileName": "metadata.json", + "metadataFileUri": "https://some-storage-account/path/metadata.json" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json new file mode 100644 index 00000000000..7255f7667f4 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "MeasurementMetadataOperations_Get", + "title": "Get measurement metadata.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003" + }, + "responses": { + "200": { + "body": { + "metadata": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json new file mode 100644 index 00000000000..859fb150e17 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "MeasurementMetadataSchemaFileInfoOperations_Get", + "title": "Returns a SAS-signed URI for downloading a metadata schema file for the measurement.\nThis URI expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "schemaFileName": "schema.json", + "schemaFileUri": "https://somewhere/schema.json" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json new file mode 100644 index 00000000000..43b5719f9db --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json @@ -0,0 +1,39 @@ +{ + "operationId": "MeasurementOperations_Delete", + "title": "Deletes the measurement.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json new file mode 100644 index 00000000000..40bd4e5a70c --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json @@ -0,0 +1,32 @@ +{ + "operationId": "MeasurementOperations_FindByIds", + "title": "Lists the measurements in a workspace that are in the given measurement IDs list.", + "parameters": { + "api-version": "2023-00-00-preview", + "body": { + "measurementIds": [ + "00000000-0000-0000-0000-000000000003" + ] + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "measurementId": "00000000-0000-0000-0000-000000000003", + "location": "string", + "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", + "resourceEndpoint": "https://some-workspace/some-resource", + "externalPackageId": "string", + "uploadId": "00000000-0000-0000-0000-000000000002", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "recordTimestampUtc": "2022-10-26T06:20:36.367Z", + "etag": "string" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json new file mode 100644 index 00000000000..c8b5a10d997 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json @@ -0,0 +1,33 @@ +{ + "operationId": "MeasurementOperations_Get", + "title": "Get measurement by ID.", + "parameters": { + "api-version": "2023-00-00-preview", + "measurementId": "00000000-0000-0000-0000-000000000003" + }, + "responses": { + "200": { + "body": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "location": "string", + "ingestTimestampUtc": "2022-10-26T06:26:04.277Z", + "resourceEndpoint": "https://some-workspace/some-resource", + "externalPackageId": "string", + "uploadId": "00000000-0000-0000-0000-000000000002", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "recordTimestampUtc": "2022-10-26T06:26:04.277Z", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json new file mode 100644 index 00000000000..7a062b87ac8 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json @@ -0,0 +1,37 @@ +{ + "operationId": "MeasurementOperations_GetAll", + "title": "Lists the measurements in a workspace.", + "parameters": { + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "measurementId": "00000000-0000-0000-0000-000000000003", + "location": "string", + "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", + "resourceEndpoint": "https://some-workspace/some-resource", + "externalPackageId": "string", + "uploadId": "00000000-0000-0000-0000-000000000002", + "discoveryId": "string", + "recordTimestampUtc": "2022-10-26T06:20:36.367Z", + "etag": "string" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json new file mode 100644 index 00000000000..2b8355f9622 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json @@ -0,0 +1,26 @@ +{ + "operationId": "MeasurementOperations_ProvideMetadataFileDownloadInformation", + "title": "Returns a SAS-signed URI for downloading a metadata file for the measurement.\nThis URI expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "resourceEndpoint": "https://some-workspace/some-resource", + "fileDownloadUri": "https://microsoft.com/a" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json new file mode 100644 index 00000000000..59ab57eee8e --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json @@ -0,0 +1,26 @@ +{ + "operationId": "MeasurementOperations_ProvideMetadataFileUploadInformation", + "title": "Returns a SAS-signed URI for uploading a metadata file for the measurement.\nThis URI expires in 24 hours.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "resourceEndpoint": "https://some-workspace/some-resource", + "fileUri": "https://microsoft.com/aspzhgmy" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json new file mode 100644 index 00000000000..342eb2aae03 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json @@ -0,0 +1,42 @@ +{ + "operationId": "MeasurementOperations_QueryMeasurementsWithMetadata", + "title": "Lists the measurements in a workspace with extended metadata.", + "parameters": { + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "measurementId": "00000000-0000-0000-0000-000000000003", + "location": "string", + "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", + "resourceEndpoint": "https://some-workspace/some-resource", + "externalPackageId": "string", + "uploadId": "00000000-0000-0000-0000-000000000002", + "discoveryId": "string", + "recordTimestampUtc": "2022-10-26T06:20:36.367Z", + "etag": "string", + "metadata": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json new file mode 100644 index 00000000000..9c7958a9071 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "MeasurementProcessingResultsOperations_Get", + "title": "Returns the measurement processing result.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "validationPassed": true, + "results": [ + { + "ruleCategory": "string", + "ruleName": "string", + "details": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "validationPassed": true, + "validationError": "string" + } + ] + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json new file mode 100644 index 00000000000..c04abe0bac2 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json @@ -0,0 +1,49 @@ +{ + "operationId": "MeasurementStateMachineOperations_Act", + "title": "Initiates process of applying an action on the measurement.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "id": "1", + "actionName": "Unlock" + }, + "responses": { + "200": { + "body": { + "id": "string", + "type": "Lock", + "availableActionNames": [ + "Unlock" + ] + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json new file mode 100644 index 00000000000..769071d9a6b --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json @@ -0,0 +1,30 @@ +{ + "operationId": "MeasurementStateMachineOperations_Get", + "title": "Returns the the state machine instance for the measurement.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview", + "id": "1" + }, + "responses": { + "200": { + "body": { + "id": "string", + "type": "string", + "availableActionNames": [ + "string" + ] + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json new file mode 100644 index 00000000000..d1e33c04f1e --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json @@ -0,0 +1,34 @@ +{ + "operationId": "MeasurementStateMachineOperations_GetAll", + "title": "List state machines instance for the measurement.", + "parameters": { + "measurementId": "00000000-0000-0000-0000-000000000003", + "api-version": "2023-00-00-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "string", + "type": "Lock", + "availableActionNames": [ + "Unlock" + ] + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json new file mode 100644 index 00000000000..c7ce71ca634 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json @@ -0,0 +1,25 @@ +{ + "operationId": "RunSampleWorkflow", + "title": "Executes an asynchronous action on the Sample. Uses long-running operation (LRO) pattern.", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "sample123" + }, + "responses": { + "204": {}, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json new file mode 100644 index 00000000000..4c1f429bb7a --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json @@ -0,0 +1,40 @@ +{ + "operationId": "SetLabelsWithPatch", + "title": "Set labels for a specific sample resource.", + "parameters": { + "api-version": "2023-00-00-preview", + "sampleId": "sample123", + "labels": [ + "list", + "of", + "new", + "labels", + "after", + "patch" + ] + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000001", + "state": "Active", + "labels": [ + "list", + "of", + "new", + "labels", + "after", + "patch" + ] + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json new file mode 100644 index 00000000000..c4a80475608 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json @@ -0,0 +1,45 @@ +{ + "operationId": "UploadDataFileOperations_Generate", + "title": "Initiates the process of sharding the files.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json new file mode 100644 index 00000000000..4baec447888 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json @@ -0,0 +1,35 @@ +{ + "operationId": "UploadDataFileOperations_GetAll", + "title": "Returns SAS signed URIs for reading data files from Azure Storage.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://somewhere/file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json new file mode 100644 index 00000000000..316a1cf4baf --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json @@ -0,0 +1,35 @@ +{ + "operationId": "UploadDataFileOperations_ListWritableUris", + "title": "List special files details for the upload resource.\nReturns SAS signed URI that allows uploading data files to Azure Storage.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://somewhere/file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json new file mode 100644 index 00000000000..cb5da0c58df --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json @@ -0,0 +1,49 @@ +{ + "operationId": "UploadOperations_Cancel", + "title": "Initiates the process of cancelling the upload.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "manifestUri": "https://some-storage-account/path/manifest.json", + "resourceEndpoint": "https://some-workspace/some-resource", + "status": "Cancelled", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "00000000-0000-0000-0000-000000000123", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json new file mode 100644 index 00000000000..972b0416ed5 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json @@ -0,0 +1,49 @@ +{ + "operationId": "UploadOperations_Complete", + "title": "Initiates the process of completing the upload and creating the measurements.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002", + "operation-id": "00000000-0000-0000-0000-000000000123" + }, + "responses": { + "200": { + "body": { + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "manifestUri": "https://some-storage-account/path/manifest.json", + "resourceEndpoint": "https://some-workspace/some-resource", + "status": "Completed", + "etag": "string" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json new file mode 100644 index 00000000000..82b186927e3 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json @@ -0,0 +1,42 @@ +{ + "operationId": "UploadOperations_CreateOrReplace", + "title": "Creates a new ingestion upload instance.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002", + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "body": { + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "resourceEndpoint": "https://some-workspace/some-resource", + "manifestUri": "https://somewhere/file.ext", + "status": "Created", + "etag": "string" + } + }, + "201": { + "body": { + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "resourceEndpoint": "https://some-workspace/some-resource", + "manifestUri": "https://somewhere/file.ext", + "status": "Created", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json new file mode 100644 index 00000000000..de6b0357deb --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json @@ -0,0 +1,30 @@ +{ + "operationId": "UploadOperations_Get", + "title": "Returns upload by ID.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "externalPackageId": "string", + "discoveryId": "00000000-0000-0000-0000-000000000001", + "manifestUri": "https://some-storage-account/path/manifest.json", + "resourceEndpoint": "https://some-workspace/some-resource", + "status": "Created", + "etag": "string" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json new file mode 100644 index 00000000000..9771401c045 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json @@ -0,0 +1,33 @@ +{ + "operationId": "UploadResultMeasurementOperations_GetAll", + "title": "Returns the final result of the discovery process.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "measurementId": "measurement-1" + }, + { + "measurementId": "measurement-2" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json new file mode 100644 index 00000000000..1238f8333f6 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json @@ -0,0 +1,44 @@ +{ + "operationId": "UploadSpecialFileOperations_Generate", + "title": "Initiates the process of generating SAS signed URIs for uploading special files for the upload.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + } + }, + "202": { + "headers": { + "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" + }, + "body": { + "operationId": "string", + "status": "Created", + "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", + "etag": "sha256", + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json new file mode 100644 index 00000000000..65c99bdef92 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json @@ -0,0 +1,35 @@ +{ + "operationId": "UploadSpecialFileOperations_GetAll", + "title": "Returns SAS signed URIs for reading special files from Azure Storage.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://somewhere/file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json new file mode 100644 index 00000000000..d217a653b12 --- /dev/null +++ b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json @@ -0,0 +1,35 @@ +{ + "operationId": "UploadSpecialFileOperations_ListWritableUris", + "title": "List special files details for the upload resource.\nReturns SAS signed URI that allows uploading special files to Azure Storage.\nThis URI expires in 24 hours.", + "parameters": { + "api-version": "2023-00-00-preview", + "uploadId": "00000000-0000-0000-0000-000000000002" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "clientFileName": "file-1.ext", + "fileUri": "https://somewhere/file-1.ext" + }, + { + "clientFileName": "file-2.ext", + "fileUri": "https://somewhere/file-2.ext" + } + ], + "nextLink": "https://workspace/path-to-collection?continuationToken=123" + } + }, + "default": { + "body": { + "error": { + "code": "string", + "message": "string", + "target": "string", + "details": [] + } + } + } + } +} diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl new file mode 100644 index 00000000000..c99fbf27748 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl new file mode 100644 index 00000000000..56e2aae27f4 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl @@ -0,0 +1,138 @@ +using Cadl.Rest; +using Azure.Core; + +namespace Adp.Core.Ingestion.Discovery; + +@doc("Internal - the model for internal use") +model DiscoveryIdentifier { + @doc("The discovery identifier.") + @key + @minLength(1) + @maxLength(36) + discoveryId: string; +} + +@doc("Discovery resource creation parameters.") +@withVisibility("create") +@withoutOmittedProperties("discoveryId") +model DiscoveryCreationParameters { + ...Discovery; +} + +@doc("A discovery resource.") +@resource("discoveries") +model Discovery { + ...DiscoveryIdentifier; + + @doc("ID of the external package (for example, the disk which contained data) which was used upon the creation of upload") + @visibility("read", "create") + externalPackageId?: string; + + @doc(""" + SAS signed URI for accessing the discovery manifest file on Azure Storage. + This URI expires in 24 hours. + """) + @visibility("read", "update") + manifestUri?: Cadl.url; + + @doc("The discovery status.") + @visibility("read", "update") + status?: DiscoveryStatus; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("A discovery special file resource.") +@resource("specialFilesUploadInfo") +@parentResource(Discovery) +model DiscoverySpecialFile { + @doc("Client file name.") + @key + clientFileName: string; + + @doc("File name on storage.") + fileUri: string; +} + +@doc("A discovery upload resource.") +@resource("uploads") +@parentResource(Discovery) +model DiscoveryUpload { + @doc("Upload identifier.") + @key + @minLength(1) + @maxLength(36) + uploadId: string; + + @doc(""" + SAS signed URI for downloading the manifest file from Azure Storage. + The manifest file contains list of all files in the group. + This URI expires in 24 hours. + """) + manifestUri: url; + ...CommonResourceEndpoint; +} + +@doc("Describes the list of special files to be uploaded") +model DiscoverySpecialFilesResponse { + ...DiscoveryIdentifier; + + @doc("List of the special files") + files: FileUploadInformation[]; +} + +@doc("Known discovery error codes.") +enum DiscoveryOperationErrorCode { + @doc("The operation has succeeded") + Succeeded: "Succeeded", + + @doc("Discovery manifest file doesn't exist") + DiscoveryManifestNotFound: "DiscoveryManifestNotFound", + + @doc("Invalid discovery manifest format") + InvalidDiscoveryManifestFormat: "InvalidDiscoveryManifestFormat", + + @doc("The special file doesn't exist") + SpecialFileNotFound: "SpecialFileNotFound", + + @doc("The special file has an invalid format") + InvalidSpecialFileFormat: "InvalidSpecialFileFormat", + + @doc("Data pool doesn't exist") + DataPoolDoesNotExist: "DataPoolDoesNotExist", + + @doc("Workspace doesn't exist") + WorkspaceDoesNotExist: "WorkspaceDoesNotExist", + + @doc("Invalid disk structure") + InvalidDiskFolderStructure: "InvalidDiskFolderStructure", + + @doc("The operation has failed with an unexpected error") + Unknown: "Unknown", +} + +@doc("The status of the discovery") +enum DiscoveryStatus { + @doc("The discovery process has been initiated") + Created: "Created", + + @doc("The system is analyzing the discovery manifest file uploaded by the client and generating the upload information for uploading special files.") + GeneratingSpecialFilesUploadInfo: "GeneratingSpecialFilesUploadInfo", + + @doc("The system has analyzed the discovery manifest file and generated the upload information for uploading special files.") + GeneratedSpecialFilesUploadInfo: "GeneratedSpecialFilesUploadInfo", + + @doc("The system is processing the special files uploaded by the client") + Completing: "Completing", + + @doc("The system has finished the analysis of special files") + Completed: "Completed", + + @doc("The system is cancelling the discovery process") + Aborting: "Aborting", + + @doc("The discovery process has been aborted") + Aborted: "Aborted", + + @doc("The discovery process has been failed") + Failed: "Failed", +} diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl new file mode 100644 index 00000000000..06d51df14f1 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl @@ -0,0 +1,67 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.Ingestion.Discovery; + +@tag("Discovery") +interface DiscoveryOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Creates a new ingestion discovery instance.") + createOrReplace is CustomResourceCreateOrReplace< + Discovery, + CustomBodyWrapper + >; + + @doc("Get discovery by ID.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of completing the discovery and creating the upload file grouping manifest files.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + complete is CustomLongRunningResourceAction; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of cancelling the discovery.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + cancel is CustomLongRunningResourceAction; +} + +@tag("Discovery") +interface DiscoverySpecialFileOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of generating SAS signed URIs for uploading special files for the discovery.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + generate is CustomLongRunningResourceCollectionAction< + DiscoverySpecialFile, + {}, + DiscoverySpecialFile + >; + + @doc(""" + List special files details for the discovery resource. + Returns SAS signed URI that allows uploading special files to Azure Storage. + This URI expires in 24 hours. + """) + listWritableUris is ResourceCollectionAction< + DiscoverySpecialFile, + {}, + Page + >; +} + +@tag("Discovery") +interface DiscoveryResultUploadOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("List upload detail for the discovery resource.") + list is CustomResourceList; +} diff --git a/packages/cadl-python/adp/Core/ingestion/main.cadl b/packages/cadl-python/adp/Core/ingestion/main.cadl new file mode 100644 index 00000000000..dccb74e6d3d --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./discovery"; +import "./upload"; diff --git a/packages/cadl-python/adp/Core/ingestion/upload/main.cadl b/packages/cadl-python/adp/Core/ingestion/upload/main.cadl new file mode 100644 index 00000000000..c99fbf27748 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/upload/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/ingestion/upload/models.cadl b/packages/cadl-python/adp/Core/ingestion/upload/models.cadl new file mode 100644 index 00000000000..2997755d094 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/upload/models.cadl @@ -0,0 +1,198 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; + +namespace Adp.Core.Ingestion.Upload; + +@doc("Internal - the model for internal use") +model UploadIdentifier { + @doc("The upload resource identifier.") + @visibility("update") + @key + @path + @minLength(1) + @maxLength(36) + uploadId: string; +} + +@doc("Upload resource creation parameters") +@withVisibility("create") +@withoutOmittedProperties("uploadId") +model UploadCreationParameters { + ...Upload; +} + +@doc("An upload resource.") +@resource("uploads") +model Upload { + ...UploadIdentifier; + + @doc("ID of the external package (for example, the disk which contained data) which was used upon the creation of upload.") + @visibility("read", "create") + externalPackageId?: string; + + @doc("The discovery identifier.") + @visibility("read", "create") + @minLength(1) + @maxLength(36) + discoveryId?: string; + + @doc(""" + SAS signed URI for uploading or reading the upload manifest file on Azure Storage. + Note, if the upload status is 'Created' then the URI is signed with 'Write' permissions, otherwise with 'Read' permission. + This URI expires in 24 hours. + """) + @visibility("read") + manifestUri?: url; + + @doc("The upload state") + @visibility("read", "update") + status?: UploadStatus; + ...CommonResourceEndpoint; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("Special file resource.") +@resource("specialFilesUploadInfo") +@parentResource(Upload) +model UploadSpecialFile { + ...FileUploadInformation; +} + +@doc("Data file resource.") +@resource("dataFilesUploadInfo") +@parentResource(Upload) +model UploadDataFile { + ...FileUploadInformation; +} + +@doc("A measurement resource created as result of the upload.") +@resource("measurements") +@parentResource(Upload) +model UploadResultMeasurement { + @doc("Measurement identifier.") + @key + measurementId: string; +} + +@doc("Upload resource response.") +model UploadIdentifierAndEndpoint { + @doc("The upload identifier.") + @minLength(1) + @maxLength(36) + uploadId: string; + ...CommonResourceEndpoint; +} + +@doc("A response providing the results of an upload") +model UploadResultsResponse { + ...UploadIdentifierAndEndpoint; + + @doc("The measurement IDs that been created by the upload") + measurementIds: string[]; +} + +@doc("A response describing the list of special files to be uploaded") +model UploadSpecialFilesResponse { + ...UploadIdentifierAndEndpoint; + + @doc("List of the special files") + files: FileUploadInformation[]; +} + +@doc("Provides upload manifest URI on Azure Storage.") +model GetUploadManifestUriResponse { + @doc("The upload identifier.") + @minLength(1) + @maxLength(36) + uploadId: string; + + @doc(""" + SAS signed URI for uploading the manifest file to Azure Storage. + This URI expires in 24 hours. + """) + manifestUri: url; + ...CommonResourceEndpoint; +} + +@doc("Parameters to the upload URIs retrieval request") +model UploadFilesRequest { + @doc("List of client file names for which the upload URIs are requested") + clientFileNames: string[]; +} + +@doc("A response providing the list of upload Uris for the files to be uploaded") +@withOptionalProperties +model UploadFilesResponse { + @doc("The upload identifier.") + @minLength(1) + @maxLength(36) + uploadId: string; + ...CommonResourceEndpoint; + + @doc("List of SAS-signed file upload URIs") + files: FileUploadInformation[]; +} + +@doc("The state of the upload") +enum UploadStatus { + @doc("The upload process has been initiated. The client should upload the upload manifest file using the SAS-signed upload URI provided by the system") + Created: "Created", + + @doc("The system is analyzing the upload manifest file uploaded by the client and generating the upload information for uploading special files.") + GeneratingSpecialFilesUploadInfo: "GeneratingSpecialFilesUploadInfo", + + @doc("The system has analyzed the upload manifest file and generated the upload information for uploading special files.") + GeneratedSpecialFilesUploadInfo: "GeneratedSpecialFilesUploadInfo", + + @doc("The system is sharding the files and generating the upload information for uploading data files.") + GeneratingDataFilesUploadInfo: "GeneratingDataFilesUploadInfo", + + @doc("The system has sharded the files and generated the upload information for uploading data files. The client should upload the measurement files using the SAS-signed upload URIs provided by the system.") + GeneratedDataFilesUploadInfo: "GeneratedDataFilesUploadInfo", + + @doc("The system is completing the upload process (creating measurements etc.)") + Completing: "Completing", + + @doc("The system completed the upload process") + Completed: "Completed", + + @doc("The system is cancelling the upload process") + Aborting: "Aborting", + + @doc("The system cancelled the upload process") + Aborted: "Aborted", + + @doc("The system marked the upload process as failed") + Failed: "Failed", +} + +@doc("Known upload types.") +enum UploadOperationErrorCode { + @doc("The operation has succeeded") + Succeeded: "Succeeded", + + @doc("Upload manifest file doesn't exist") + UploadManifestNotFound: "UploadManifestNotFound", + + @doc("Invalid upload manifest format") + InvalidUploadManifestFormat: "InvalidUploadManifestFormat", + + @doc("Invalid disk structure") + InvalidDiskFolderStructure: "InvalidDiskFolderStructure", + + @doc("One or more special files was of an invalid format") + InvalidSpecialFileFormat: "InvalidSpecialFileFormat", + + @doc("One or more special files assigned the measurement to a different data pool than that of the upload.") + DataPoolMismatch: "DataPoolMismatch", + + @doc("One or more special files doesn't exist") + SpecialFileNotFound: "SpecialFileNotFound", + + @doc("Expected data files are missing from one or more shards") + MissingDataFiles: "MissingDataFiles", + + @doc("The operation has failed with an unexpected error") + Unknown: "Unknown", +} diff --git a/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl b/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl new file mode 100644 index 00000000000..4b66b2088e7 --- /dev/null +++ b/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl @@ -0,0 +1,92 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.Ingestion.Upload; + +@tag("Upload") +interface UploadOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Creates a new ingestion upload instance.") + createOrReplace is CustomResourceCreateOrReplace< + Upload, + CustomBodyWrapper + >; + + @doc("Get discovery by ID.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of completing the upload and creating the measurements.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + complete is CustomLongRunningResourceAction; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of cancelling the upload.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + cancel is CustomLongRunningResourceAction; +} + +@tag("Upload") +interface UploadSpecialFileOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of generating SAS signed URIs for uploading special files for the upload.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + generate is CustomLongRunningResourceCollectionAction< + UploadSpecialFile, + {}, + UploadSpecialFile + >; + + @doc(""" + List special files details for the upload resource. + Returns SAS signed URI that allows uploading special files to Azure Storage. + This URI expires in 24 hours. + """) + listWritableUris is ResourceCollectionAction< + UploadSpecialFile, + {}, + Page + >; +} + +@tag("Upload") +interface UploadDataFileOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of allocating the data files.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + generate is CustomLongRunningResourceCollectionAction< + UploadDataFile, + {}, + UploadDataFile + >; + + @doc(""" + List special files details for the upload resource. + Returns SAS signed URI that allows uploading data files to Azure Storage. + This URI expires in 24 hours. + """) + listWritableUris is ResourceCollectionAction< + UploadDataFile, + {}, + Page + >; +} + +@tag("Upload") +interface UploadResultMeasurementOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("List of the measurement identifiers that have been created by the upload.") + getAll is CustomResourceList; +} diff --git a/packages/cadl-python/adp/Core/main.cadl b/packages/cadl-python/adp/Core/main.cadl new file mode 100644 index 00000000000..e3553e9fe92 --- /dev/null +++ b/packages/cadl-python/adp/Core/main.cadl @@ -0,0 +1,17 @@ +import "../Adp.Shared/common.cadl"; + +import "./ingestion"; +import "./classification"; +import "./measurement"; + +import "./models.cadl"; +import "./operations.cadl"; + +using Cadl.Http; + +@service({ + title: "Adp", + version: "2023-00-00-preview", +}) +@useAuth(OAuth2Auth<[ImplicitAuthorizationFlow]>) +namespace Adp.Core; diff --git a/packages/cadl-python/adp/Core/measurement/classification/main.cadl b/packages/cadl-python/adp/Core/measurement/classification/main.cadl new file mode 100644 index 00000000000..c99fbf27748 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/classification/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/classification/models.cadl b/packages/cadl-python/adp/Core/measurement/classification/models.cadl new file mode 100644 index 00000000000..fcbcfb27084 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/classification/models.cadl @@ -0,0 +1,20 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using OpenAPI; +using Autorest; + +namespace Adp.Core.Measurement.Classification; + +@doc("Measurement classification") +@resource("classifications") +@parentResource(Measurement) +model MeasurementClassification { + ...Adp.Classification; +} + +@doc("{name} resource creation parameters.", MeasurementClassification) +@withVisibility("create") +model MeasurementClassificationCreationParameters { + ...MeasurementClassification; +} diff --git a/packages/cadl-python/adp/Core/measurement/classification/operations.cadl b/packages/cadl-python/adp/Core/measurement/classification/operations.cadl new file mode 100644 index 00000000000..65d8c68616a --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/classification/operations.cadl @@ -0,0 +1,35 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.Measurement.Classification; + +@tag("Measurement Classification") +interface MeasurementClassificationOperations { + @doc("Get measurement classification by schema name.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Assigns classification to the measurement.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + create is CustomLongRunningResourceCreateUsingHttpPost< + MeasurementClassification, + CustomBodyWrapper + >; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Unassign the classification from the measurement.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + delete is CustomLongRunningResourceDelete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Lists the classifications assigned to the measurement.") + getAll is CustomResourceList; +} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl new file mode 100644 index 00000000000..c99fbf27748 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl new file mode 100644 index 00000000000..599b3397365 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl @@ -0,0 +1,21 @@ +using Cadl.Http; +using Cadl.Rest; + +namespace Adp.Core.DataStream.Classification; + +enum DataStreamClassificationClients { + DataStreamClassificationsClient, +} + +@doc("The data-stream classification.") +@resource("classifications") +@parentResource(DataStream) +model DataStreamClassification { + ...Adp.Classification; +} + +@doc("{name} resource creation parameters.", DataStreamClassification) +@withVisibility("create") +model DataStreamClassificationCreationParameters { + ...DataStreamClassification; +} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl new file mode 100644 index 00000000000..7baa054f020 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl @@ -0,0 +1,35 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.DataStream.Classification; + +@tag("Data Stream Classification") +interface DataStreamClassificationOperations { + @doc("Get classification by schema name.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Assigns the classification to the data-stream.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + create is CustomLongRunningResourceCreateUsingHttpPost< + DataStreamClassification, + CustomBodyWrapper + >; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Unassign the classification from the data-stream.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + delete is CustomLongRunningResourceDelete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Lists the classifications assigned to the data-stream.") + getAll is CustomResourceList; +} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl new file mode 100644 index 00000000000..c99fbf27748 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl @@ -0,0 +1,3 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl new file mode 100644 index 00000000000..0250c76a987 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl @@ -0,0 +1,340 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; + +namespace Adp.Core.DataStream; + +@doc("A data-stream resource") +@resource("dataStreams") +@parentResource(Adp.Core.Measurement.Measurement) +model DataStream { + @doc("The data stream identifier") + @key + dataStreamId: string; + ...CommonResourceEndpoint; + + @doc("The data stream lineage information") + @visibility("create") + lineage: DataStreamLineage; + + @doc("The data stream status") + @visibility("update") + status: DataStreamStatus; + + @doc("The data stream type") + @visibility("update") + type: DataStreamType; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +alias Tags = Record; + +@doc("DataStream resource creation parameters") +@withVisibility("create") +@withoutOmittedProperties("dataStreamId") +model DataStreamCreationParameters { + ...DataStream; +} + +@doc("A wrapper for the list of data streams") +model DataStreamListResponse { + @doc("Collection of the data stream's channels") + dataStreams: DataStream[]; +} + +@doc("Graph of matched data streams by processing objects graph") +model DataStreamsGraph { + @doc("Dictionary of data stream by processing object id") + dataStreamByProcessingObjectId: Record; +} + +@doc("List of graphs of matched data streams by processing objects graph") +model DataStreamsGraphListResponse { + @doc("List of data streams matched graphs") + dataStreamsGraphs: DataStreamsGraph[]; +} + +@doc("Data stream search by type query parameters") +model FindDataStreamByTypeRequestParameters { + @doc("The data-stream type to search for") + type: DataStreamType; +} + +@doc("Data stream search by lineage query parameters") +model FindDataStreamByLineageRequestParameters { + @doc("The data-stream lineage to search for") + lineage: DataStreamLineage; +} + +@doc("Data stream search by tags parameters") +model FindDataStreamByTagsRequestParameters { + @doc("The list of tags to search for") + tags: Record; +} + +@doc("Data stream file upload parameters") +model UploadDerivedDataStreamFilesRequest { + @doc("The information of the files that are to be uploaded") + files: DerivedDataStreamFileInformation[]; +} + +@doc("Data stream file upload request parameters") +model UploadDerivedDataStreamFilesResponse { + @doc("Per-file upload instructions") + files: FileUploadInformation[]; +} + +@doc("Data stream lineage information") +model DataStreamLineage { + @doc("The data stream's metadata") + producerMetadata: Record; + + @doc("The data stream's inputs") + inputs: DataStreamInput[]; +} + +@doc("Data-stream input definition.") +model DataStreamInput { + @doc("The source data-stream identifier") + sourceDataStreamId: string; + + @doc("Collection of the data stream's channels") + channels?: string[]; +} + +@doc("Processing objects graph") +model FindDataStreamByLineageGraphRequestParameters { + @doc("The processing objects") + processingObjects: ProcessingObject[]; + + @doc("The processing objects edges") + edges: ProcessingObjectEdge[]; +} + +@doc("Processing object node information in a processing objects Graph") +model ProcessingObject { + @doc("The processing object metadata") + metadata: Record; + + @doc("A request unique ID to identify processing objects in graph") + id: string; +} + +@doc("Processing objects edge") +model ProcessingObjectEdge { + @doc("The source processing object ID") + sourceId: string; + + @doc("The target processing object ID") + targetId: string; +} + +@doc("Data stream rolling information") +model DataStreamRollingInformation { + @doc("Data stream rolling strategy") + strategy: DataStreamRollingStrategy; + + @doc("Data stream rolling unit") + unit: DataStreamRollingUnit; + + @doc("Data stream rolling value") + @minValue(0) + value: int32; +} + +@doc("Data stream rolling strategy") +enum DataStreamRollingStrategy { + Time: "Time", + Size: "Size", +} + +@doc("Data stream rolling unit") +enum DataStreamRollingUnit { + Seconds: "Seconds", + Minutes: "Minutes", + kB: "kB", + MB: "MB", + GB: "GB", +} + +@doc("The access information to the data stream shard") +model DataStreamShardAccessInformation { + @doc(""" +SAS signed URI for reading the shard folder content from Azure Storage. +This URI expires in 24 hours. +""") + shardFolderUri: url; + + @doc(""" +SAS signed URI for reading the shard manifest file from Azure Storage. +This URI expires in 24 hours. +""") + manifestFileUri: url; +} + +@doc("Data stream state") +enum DataStreamStatus { + Created: "Created", + Completing: "Completing", + Completed: "Completed", + Failed: "Failed", + Failing: "Failing", + Clearing: "Clearing", + Cleared: "Cleared", +} + +@doc("Data stream type") +enum DataStreamType { + System: "System", + Raw: "Raw", + Derived: "Derived", +} + +@doc("Data stream shards list and relevant metadata") +model DataStreamShardsResponse { + @doc("The list of shards associated with the data stream") + shards: DataStreamShardAccessInformation[]; +} + +@doc("Information about a file") +model DerivedDataStreamFileInformation { + @doc("The file name as provided by the client") + clientFileName: string; + + @doc("The file recording UTC timestamp as provided by the client") + recordingTimestampUtc?: zonedDateTime; +} + +enum StorageTypes { + ShardedStorage: "shardedStorage", + Storage: "storage", +} + +@doc("Common data-stream storage model.") +model StorageBase { + @doc("Storage type.") + type: StorageTypes; + + @doc("The data stream rolling information") + @visibility("create") + rollingInformation?: DataStreamRollingInformation; + + @doc(""" + SAS signed URI for downloading the data stream storage manifest file from Azure Storage. + This URI expires in 24 hours. + """) + @visibility("read", "update") + manifestUri: url; + + @doc(""" + SAS signed URI for accessing the data stream data stored on the Azure Storage. + This URI expires in 24 hours. + """) + @visibility("read") + dataFolderUri?: url; + + @doc("The list of shards associated with the data stream") + @visibility("read", "update") + @minItems(1) + shards: DataStreamShardAccessInformation[]; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("A data-stream with non sharded storage resource") +@resource("storage") +@parentResource(DataStream) +model Storage { + @doc(""" + The data stream storage identifier. + Not in use as this is a singleton resource. + TODO: check with CADL team how to define a singleton child resource without key. + """) + @key + id: SingletonIdentifier; + ...StorageBase; +} + +@doc("Storage resource creation parameters") +@withoutOmittedProperties("id") +@withVisibility("create") +model StorageCreationParameters { + ...Storage; +} + +@doc("A data-stream tags.") +@resource("tags") +@parentResource(DataStream) +model TagSet { + @doc(""" + The data stream tag set identifier. + Not in use as this is a singleton resource. Tags could be set or returned as singleton set. + TODO: check with CADL team how to define a singleton child resource without key. + """) + @key + id: SingletonIdentifier; + ...TagSetBase; +} + +@doc("Tag set.") +model TagSetBase { + @doc("Set of data-stream tags.") + @visibility("read", "create") + tags: Tag[]; +} + +@doc("Tag element.") +model Tag { + @doc("Tag identifier") + @key + key: string; + + @doc("Tag value.") + value: string; +} + +@doc("Storage resource creation parameters") +@withoutOmittedProperties("id") +@withVisibility("create") +model TagSetCreationParameters { + ...TagSet; +} + +@doc("Data-stream file list.") +@resource("files") +@parentResource(DataStream) +model DataStreamFile { + @doc("Client file name.") + @key + clientFileName: string; + + @doc(""" + SAS signed URI for downloading the file from Azure Storage. + This URI expires in 24 hours. + """) + fileUri: url; + + @doc("UTC date and time indicating the start of file recording") + externalTimeStamp: zonedDateTime; + + @doc("Size in bytes") + size: int64; +} + +@doc("Data-stream logs folder") +@resource("logs") +@parentResource(DataStream) +model DataStreamLogsContainer { + @doc("Static identifier for singleton resource") + @key + id: SingletonIdentifier; + ...DataStreamLogsContainerBase; +} + +@doc("Data-stream logs folder") +model DataStreamLogsContainerBase { + @doc(""" + SAS signed URI for accessing the logs container on Azure Storage. + This URI expires in 24 hours. + """) + logFolderUri: url; +} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl new file mode 100644 index 00000000000..72f93f649eb --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl @@ -0,0 +1,159 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.DataStream; + +@tag("Data Stream") +interface DataStreamOperations { + @doc("Get data-stream by identifier.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Creates new data-stream resource.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + create is CustomLongRunningResourceCreateWithServiceProvidedName< + DataStream, + CustomBodyWrapper + >; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Clear the data-stream content.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + clearContent is CustomLongRunningResourceAction; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc(""" + Lists the existing data-streams. + Supports the following filter expressions: + - filter="type=[System | Raw | Derived]" + """) + getAll is CustomResourceList< + DataStream, + { + parameters: FilterQueryParameter; + } + >; + + @doc(""" + Returns SAS-signed upload URIs for files that need to be uploaded to Azure Storage. + This URI expires in 24 hours. + """) + stageFiles is ResourceAction< + DataStream, + CustomBodyWrapper, + UploadDerivedDataStreamFilesResponse + >; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Marks a data stream as completed") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + complete is CustomLongRunningResourceAction; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Marks a data stream as failed") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + fail is CustomLongRunningResourceAction; + + @doc("Lists the data-streams by tags.") + findByTags is ResourceCollectionAction< + DataStream, + CustomBodyWrapper, + Page + >; + + @doc("Lists the data-streams by lineage.") + findByLineage is ResourceCollectionAction< + DataStream, + CustomBodyWrapper, + Page + >; + + @doc("Lists the data-streams by lineage graph.") + getLineageGraphsByLineage is ResourceCollectionAction< + DataStream, + CustomBodyWrapper, + Page + >; +} + +@tag("Data Stream") +interface DataStreamStorageOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc(""" + Create or replace storage information of the data-stream. + Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage. + The SAS token expires in 24 hours. + """) + @segmentOf(Storage) + createOrReplace is CustomSingletonResourceCreateOrReplace< + Storage, + CustomBodyWrapper + >; + + @doc(""" + Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage. + The SAS token expires in 24 hours. + """) + getWithWritableUris is ResourceCollectionAction; +} + +#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." +@tag("Data Stream") +interface DataStreamTagsOperations { + @doc("Returns set of the data-stream tags.") + @segmentOf(TagSet) + get is CustomSingletonResourceRead; + + @doc("Create or replace all tags at once.") + @segmentOf(TagSet) + createOrReplace is CustomSingletonResourceCreateOrReplace< + TagSet, + CustomBodyWrapper, + TagSetBase + >; +} + +#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." +@tag("Data Stream") +interface DataStreamFileOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("Returns SAS signed URIs for reading special files from Azure Storage.") + getAll is CustomResourceList; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." + @doc("Initiates the process of generating SAS signed URIs for accessing the data-stream files.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + generate is CustomLongRunningResourceCollectionAction< + DataStreamFile, + {}, + DataStreamFile + >; +} + +#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." +@tag("Data Stream") +interface DataStreamLogsContainerOperations { + @doc(""" + Returns SAS signed URI of the data-stream logs folder that allow uploading log files to Azure Storage. + The SAS token expires in 24 hours. + """) + getWritableUri is ResourceCollectionAction< + DataStreamLogsContainer, + {}, + DataStreamLogsContainerBase + >; +} diff --git a/packages/cadl-python/adp/Core/measurement/main.cadl b/packages/cadl-python/adp/Core/measurement/main.cadl new file mode 100644 index 00000000000..5614eb96813 --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/main.cadl @@ -0,0 +1,6 @@ +import "../main.cadl"; +import "./models.cadl"; +import "./operations.cadl"; +import "./classification"; +import "./data-stream"; +import "./data-stream/classification"; diff --git a/packages/cadl-python/adp/Core/measurement/models.cadl b/packages/cadl-python/adp/Core/measurement/models.cadl new file mode 100644 index 00000000000..6075ea5245a --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/models.cadl @@ -0,0 +1,261 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; + +namespace Adp.Core.Measurement; + +@parentResource(Measurement) +@resource("stateMachines") +@doc("State machine") +model StateMachine { + @doc("The state machine identifier.") + @key + id: string; + + @doc("Type of the state machine") + type: string; + + @doc("Type of the state machine") + availableActionNames: string[]; +} + +@doc("State machine action name.") +model StateMachineAction { + @doc("The state machine action name.") + actionName: string; +} + +@doc("A measurement resource") +@resource("measurements") +model Measurement { + @doc("The measurement identifier.") + @key + measurementId: string; + + @doc("The storage account location which contains the measurement") + location: string; + + @doc("The UTC time the measurement was ingested at") + ingestTimestampUtc?: zonedDateTime; + ...CommonResourceEndpoint; + + @doc(" The ID of the external package (for example, the disk which contained data) as specified by the customer upon data ingestion") + externalPackageId?: string; + + @doc("ID of the upload process which caused the creation of this measurement") + uploadId?: string; + + @doc("ID of the discovery process which caused the creation of this measurement") + discoveryId?: string; + + @doc("The UTC time the measurement was recorded at") + recordTimestampUtc?: zonedDateTime; + ...Azure.Core.Foundations.Extensions.CustomEtagProperty; +} + +@doc("Custom query data set: Measurement and metadata.") +model MeasurementWithMetadata { + ...Measurement; + ...MeasurementMetadataBase; +} + +@doc("Measurement processing result.") +@resource("processingResults") +@parentResource(Measurement) +model MeasurementProcessingResults { + @doc( + """ + The {name} identifier. + Not in use as this is a singleton resource. + TODO: check with CADL team how to define a singleton child resource without key. + """, + MeasurementProcessingResults + ) + @key + id: SingletonIdentifier; + ...MeasurementProcessingResultsBase; +} + +@doc("Measurement metadata without resource identifier.") +model MeasurementMetadataBase { + @doc("The measurement metadata dictionary") + metadata: Record; +} + +@doc("Measurement metadata.") +@resource("metadata") +@parentResource(Measurement) +model MeasurementMetadata { + @doc( + """ + The {name} identifier. + Not in use as this is a singleton resource. + TODO: check with CADL team how to define a singleton child resource without key. + """, + MeasurementMetadata + ) + @key + id: SingletonIdentifier; + ...MeasurementMetadataBase; +} + +@doc("Measurement metadata file information model.") +model MeasurementMetadataFileInfoBase { + @doc("The measurement's metadata file name") + metadataFileName: string; + + @doc(""" + SAS signed URI to measurement metadata file. + If file already exists on storage then ETag of this file will be returned in the response header. + This URI expires in 24 hours. + """) + metadataFileUri: url; + ...EtagResponseEnvelope; +} + +@doc("Measurement metadata file information resource.") +@resource("metadataFileInfo") +@parentResource(Measurement) +model MeasurementMetadataFileInfo { + @doc( + """ + The {name} identifier. + Not in use as this is a singleton resource. + TODO: check with CADL team how to define a singleton child resource without key. + """, + MeasurementMetadataFileInfo + ) + @key + id: SingletonIdentifier; + ...MeasurementMetadataFileInfoBase; +} + +@doc("Measurement metadata schema file information model.") +model MeasurementMetadataSchemaFileInfoBase { + @doc("Measurement schema file name.") + schemaFileName?: string; + + @doc(""" + SAS signed URI for downloading the measurement metadata schema file from Azure Storage. + This URI expires in 24 hours. + """) + schemaFileUri: url; +} + +@doc("Measurement metadata schema file information resource.") +@resource("metadataSchemaFileInfo") +@parentResource(Measurement) +model MeasurementMetadataSchemaFileInfo { + @doc( + """ + The {name} identifier. + Not in use as this is a singleton resource. + TODO: check with CADL team how to define a singleton child resource without key. + """, + MeasurementMetadataSchemaFileInfo + ) + @key + id: SingletonIdentifier; + ...MeasurementMetadataSchemaFileInfoBase; +} + +@doc("Request parameters for the complete upload metadata file API") +model CompleteUploadMetadataFileRequest { + @doc("The ETag of the uploaded metadata file") + pendingFileEtag: string; +} + +@doc("A wrapper for the List of measurements IDs") +model MeasurementListRequestParameters { + @doc("The measurement IDs list") + measurementIds: string[]; +} + +@doc("A wrapper for the List of measurements IDs") +model MeasurementIdList { + @doc("The measurement IDs list") + measurementIds: string[]; +} + +/* @summary("TODO: REMOVE - not in use") +@doc("Measurement metadata - new entries descriptor") +model MeasurementMetadataNewEntries { + @doc("The entries to be updated") + entries: MeasurementMetadataNewEntry[]; +} */ + +/* @summary("TODO: REMOVE - not in use") +@doc("Measurement metadata new entry information") +model MeasurementMetadataNewEntry { + ...CommonKeyValuePair; +} */ + +/* @summary("TODO: REMOVE - not in use") +@doc("Measurement metadata update entries") +model MeasurementMetadataUpdateEntries { + @doc("The entries to be updated") + entries: MeasurementMetadataUpdateEntry[]; +} + +@doc("Measurement metadata entry update information") +model MeasurementMetadataUpdateEntry { + @doc("The key") + key: string; + + @doc("The old value") + oldValue: string; + + @doc("The new value") + newValue: string; +} + +@summary("TODO: REMOVE - not in use") +@doc("An error that occurred while trying to fetch a measurement's schema file") +enum MeasurementSchemaErrorCode { + SchemaUriExtractionFailed: "SchemaUriExtractionFailed", + CustomerDefaultSchemaUriCouldNotBeResolved: "CustomerDefaultSchemaUriCouldNotBeResolved", + SchemaFetchingFailed: "SchemaFetchingFailed", + SavingSchemaToStorageFailed: "SavingSchemaToStorageFailed", + SchemaUriNotAllowedByTenant: "SchemaUriNotAllowedByTenant", + Unknown: "Unknown", +} + +@summary("TODO: REMOVE - not in use") +@doc("The measurement's execution status") +enum MeasurementStateExecutionStatus { + Running: "Running", + Succeeded: "Succeeded", + Failed: "Failed", + Deleting: "Deleting", +} +*/ + +@summary("TODO: REMOVE - not in use") +@doc("The measurement's validation result") +@withOptionalProperties +model MeasurementProcessingResultsBase { + @doc("The measurement's validity") + validationPassed: boolean; + + @doc("The measurement's rule validation results") + results: MeasurementRuleValidationResult[]; +} + +@doc("The result of evaluation of measurement validation rule") +@withOptionalProperties +model MeasurementRuleValidationResult { + @doc("Measurement validation rule category") + ruleCategory: string; + + @doc("Measurement validation rule name") + ruleName: string; + + @doc("Measurement validation rule metadata") + details: Record; + + @doc("Measurement validation rule evaluation result") + validationPassed: boolean; + + @doc("Measurement validation error message") + validationError?: string; +} diff --git a/packages/cadl-python/adp/Core/measurement/operations.cadl b/packages/cadl-python/adp/Core/measurement/operations.cadl new file mode 100644 index 00000000000..ef1de949a1f --- /dev/null +++ b/packages/cadl-python/adp/Core/measurement/operations.cadl @@ -0,0 +1,121 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Azure.Core.Foundations.Extensions; +using OpenAPI; +using Autorest; + +namespace Adp.Core.Measurement; + +@tag("Measurement") +interface MeasurementOperations { + @doc("Get measurement by ID.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Deletes the measurement.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + delete is CustomLongRunningResourceDelete; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Lists the measurements in a workspace.") + getAll is CustomResourceList; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Lists the measurements in a workspace with extended metadata.") + queryMeasurementsWithMetadata is ResourceCollectionAction< + Measurement, + {}, + Page + >; + + @doc("Lists the measurements in a workspace that are in the given measurement IDs list.") + findByIds is ResourceCollectionAction< + Measurement, + CustomBodyWrapper, + Page + >; +} + +@tag("Measurement") +interface MeasurementMetadataOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("Returns the measurement metadata.") + @segmentOf(MeasurementMetadata) + get is CustomSingletonResourceRead< + MeasurementMetadata, + {}, + MeasurementMetadataBase + >; +} + +@tag("Measurement") +interface MeasurementProcessingResultsOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("Returns the measurement processing result.") + @segmentOf(MeasurementProcessingResults) + get is CustomSingletonResourceRead< + MeasurementProcessingResults, + {}, + MeasurementProcessingResultsBase + >; +} + +@tag("Measurement") +interface MeasurementStateMachineOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("Returns the state machine instance for the measurement.") + get is ResourceRead; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("List state machines instance for the measurement.") + getAll is CustomResourceList; + + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Initiates process of applying an action on the measurement.") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + act is CustomLongRunningResourceAction< + StateMachine, + CustomBodyWrapper + >; +} + +@tag("Measurement") +interface MeasurementMetadataFileInfoOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." + @doc("Initiates a process that replaces the measurement's metadata file") + @extension("x-ms-long-running-operation", true) + @asyncOperationOptions("location") + @pollingOperation(LongRunningOperationStatus) + complete is CustomLongRunningResourceCollectionAction< + MeasurementMetadataFileInfo, + CustomBodyWrapper, + MeasurementMetadataFileInfoBase + >; + + @doc(""" + Returns SAS signed URI that allows uploading temporary measurement metadata file to Azure Storage. + This URI expires in 24 hours. + """) + getWritableUri is ResourceCollectionAction< + MeasurementMetadataFileInfo, + {}, + MeasurementMetadataFileInfoBase + >; +} + +@tag("Measurement") +interface MeasurementMetadataSchemaFileInfoOperations { + #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." + @doc("Returns the measurement metadata schema file information.") + @segmentOf(MeasurementMetadataSchemaFileInfo) + get is CustomSingletonResourceRead< + MeasurementMetadataSchemaFileInfo, + {}, + MeasurementMetadataSchemaFileInfoBase + >; +} diff --git a/packages/cadl-python/adp/Core/models.cadl b/packages/cadl-python/adp/Core/models.cadl new file mode 100644 index 00000000000..75c083fc760 --- /dev/null +++ b/packages/cadl-python/adp/Core/models.cadl @@ -0,0 +1,12 @@ +using Cadl.Versioning; + +@versioned(Versions) +@versionedDependency( + [ + [ + Adp.Versions.v2023_00_00_for_public_preview, + Azure.Core.Versions.v1_0_Preview_1 + ] + ] +) +namespace Adp.Core; diff --git a/packages/cadl-python/adp/Core/operations.cadl b/packages/cadl-python/adp/Core/operations.cadl new file mode 100644 index 00000000000..c9b5e6f1722 --- /dev/null +++ b/packages/cadl-python/adp/Core/operations.cadl @@ -0,0 +1,17 @@ +using Cadl.Http; +using Cadl.Rest; +using Azure.Core; +using Autorest; + +namespace Adp.Core; + +/* + This interface was added to solve the following cald compiler error + Compiler error message: 'Interface "LongRunningOperations" should have been projected already' + See: @cadl-lang\compiler\dist\core\projector.js + + Note, I think it happes because shared library has different namespace, i.e. Adp.Shared +*/ + +@tag("Long Running Operation") +op LongRunningOperationStatus is Adp.Shared.LongRunningOperations.getStatus; diff --git a/packages/cadl-python/adp/Core/package.json b/packages/cadl-python/adp/Core/package.json new file mode 100644 index 00000000000..23048891219 --- /dev/null +++ b/packages/cadl-python/adp/Core/package.json @@ -0,0 +1,182 @@ +{ + "name": "@cadl-api-spec/adp-core", + "version": "0.1.0", + "description": "ADP Core API", + "private": true, + "main": "index.js", + "cadlMain": "client.cadl", + "config": { + "verbose": " -Verbose", + "CoreOutputDirectory": "../data-plane/Adp.Core", + "CorePublicOutputFile": "preview/2023-00-00-preview/adp-core-api.json", + "PublicClientPath": "../generated/clients/Core/Clients.Core.vDraftCompliant", + "PublicClientNamespace": "Microsoft.Azure.Adp.Core.Clients.vDraftCompliant", + "PublishCorePublicOutputFileName": "../../../../draftcompliant/apispec.core.2023-00-00-draftcompliant.json", + "AutorestManifestFile": "../src/scripts/autorest.md", + "RepositoryRootDirectory": "../../../../../../.." + }, + "scripts": { + "lint": "cadl compile . --warn-as-error --import @cadl-lang/library-linter --no-emit", + "format": "npm run _formatCadl && npm run _formatJs", + "validate": "npm run _validateOpenApiSpec && npm run _validateExamples", + "build": "npm run format && npx cadl compile . && npm run validate", + "publish": "pwsh ../src/scripts/publish.ps1 %npm_package_config_verbose% -SourceOpenApiSpecPath %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile% -OutputOpenApiSpecPath %npm_package_config_PublishCorePublicOutputFileName%", + "check-version-mismatch": "syncpack list-mismatches", + "fix-version-mismatch": "syncpack fix-mismatches", + "_refreshVSToken": "vsts-npm-auth -config %npm_package_config_RepositoryRootDirectory%/.npmrc", + "_validateOpenApiSpec": "pwsh ../src/scripts/validate-spec.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", + "_validateExamples": "pwsh ../src/scripts/validate-examples.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", + "_compile": "pwsh ../src/scripts/compile.ps1 -IsPublicApi -InputCadl . -OutputPath %npm_package_config_CoreOutputDirectory% -OutputFile %npm_package_config_CorePublicOutputFile%", + "_generateClientWithAutoRest": "pwsh ../src/scripts/generate-autorest-client.ps1 -UseLatestAutoRestVersion -InputOpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile% -OutputPath %npm_package_config_PublicClientPath%/generated -Namespace %npm_package_config_PublicClientNamespace% -AutorestManifestFile %npm_package_config_AutorestManifestFile%", + "_generateExamples": "pwsh ../src/scripts/generate-examples.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", + "_formatCadl": "npx cadl format --pretty ./**/*.cadl", + "_formatJs": "prettier --write \"**/*.+(js|json)\"" + }, + "keywords": [], + "author": "Microsoft Corporation", + "license": "MIT", + "peerDependencies": { + "@cadl-api-spec/adp-shared": "../Adp.Shared" + }, + "devDependencies": { + "@azure-tools/cadl-autorest": "~0.24.0", + "@azure-tools/cadl-azure-core": "~0.24.0", + "@azure-tools/cadl-csharp": "^0.1.11-beta.20221229.1", + "@azure-tools/cadl-dpg": "~0.24.0", + "@cadl-lang/compiler": "0.38.5", + "@cadl-lang/library-linter": "~0.38.0", + "@cadl-lang/openapi": "~0.38.0", + "@cadl-lang/openapi3": "~0.38.0", + "@cadl-lang/rest": "0.38.0", + "@cadl-lang/versioning": "~0.38.0", + "avocado": "1.0.0", + "prettier": "^2.7.1", + "syncpack": "^8.2.4" + }, + "syncpack": { + "workspace": false, + "source": [ + "./package.json", + "../*/package.json" + ], + "versionGroups": [ + { + "dependencies": [ + "@cadl-lang/openapi" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.38.0" + }, + { + "dependencies": [ + "@cadl-lang/openapi3" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.38.0" + }, + { + "dependencies": [ + "@cadl-lang/rest" + ], + "packages": [ + "**" + ], + "pinVersion": "0.38.0" + }, + { + "dependencies": [ + "@cadl-lang/versioning" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.38.0" + }, + { + "dependencies": [ + "@azure-tools/cadl-autorest" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.24.0" + }, + { + "dependencies": [ + "@azure-tools/cadl-azure-core" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.24.0" + }, + { + "dependencies": [ + "@cadl-lang/compiler" + ], + "packages": [ + "**" + ], + "pinVersion": "0.38.5" + }, + { + "dependencies": [ + "@azure-tools/cadl-dpg" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.24.0" + }, + { + "dependencies": [ + "@azure-tools/cadl-csharp" + ], + "packages": [ + "**" + ], + "pinVersion": "0.1.11-beta.20221229.1" + }, + { + "dependencies": [ + "avocado" + ], + "packages": [ + "**" + ], + "pinVersion": "1.0.0" + }, + { + "dependencies": [ + "prettier" + ], + "packages": [ + "**" + ], + "pinVersion": "^2.7.1" + }, + { + "dependencies": [ + "syncpack" + ], + "packages": [ + "**" + ], + "pinVersion": "^8.2.4" + }, + { + "dependencies": [ + "@cadl-lang/library-linter" + ], + "packages": [ + "**" + ], + "pinVersion": "~0.38.0" + } + ] + } +} From 19eda07583ec32693fcca98323b8a201f9b00cee Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Mon, 9 Jan 2023 14:11:05 +0800 Subject: [PATCH 2/5] fix --- packages/cadl-python/src/emitter.ts | 72 +++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/packages/cadl-python/src/emitter.ts b/packages/cadl-python/src/emitter.ts index 9404a070c5e..e3ccd256370 100644 --- a/packages/cadl-python/src/emitter.ts +++ b/packages/cadl-python/src/emitter.ts @@ -32,19 +32,15 @@ import { getFormat, getMinItems, getMaxItems, - getNamespaceFullName, EmitContext, listServices, Union, isNullType, SyntaxKind, - emitFile, Type, - getKnownValues, } from "@cadl-lang/compiler"; import { getAuthentication, - getContentTypes, getHeaderFieldName, getHttpOperation, getPathParamName, @@ -52,12 +48,11 @@ import { getServers, HttpAuth, HttpOperationParameter, - HttpOperationParameters, - HttpOperationRequestBody, HttpOperationResponse, HttpOperationResponseContent, HttpServer, isStatusCode, + HttpOperation } from "@cadl-lang/rest/http"; import { getAddedOn } from "@cadl-lang/versioning"; import { @@ -247,15 +242,16 @@ function getEffectiveSchemaType(program: Program, type: Model): Model { function getType(program: Program, type: EmitterType): any { // don't cache simple type(string, int, etc) since decorators may change the result const enableCache = !isSimpleType(program, type); + const effectiveModel = type.kind === "Model" ? getEffectiveSchemaType(program, type) : type; if (enableCache) { - const cached = typesMap.get(type); + const cached = typesMap.get(effectiveModel); if (cached) { return cached; } } let newValue = emitType(program, type); if (enableCache) { - typesMap.set(type, newValue); + typesMap.set(effectiveModel, newValue); if (type.kind === "Model") { // need to do properties after insertion to avoid infinite recursion for (const property of type.properties.values()) { @@ -325,7 +321,50 @@ type BodyParameter = ParamBase & { defaultContentType: string; }; -function emitBodyParameter(program: Program, body: HttpOperationRequestBody, operation: Operation): BodyParameter { +function getBodyType( + program: Program, + route: HttpOperation +): Type { + let bodyModel = route.parameters.body?.type; + if (bodyModel && bodyModel.kind === "Model" && route.operation) { + const resourceType = getResourceOperation( + program, + route.operation + )?.resourceType; + if (resourceType && route.responses && route.responses.length > 0) { + const resp = route.responses[0]; + if (resp && resp.responses && resp.responses.length > 0) { + const responseBody = resp.responses[0]?.body; + if (responseBody?.type?.kind === "Model") { + const bodyTypeInResponse = getEffectiveSchemaType( + program, + responseBody.type + ); + // response body type is reosurce type, and request body type (if templated) contains resource type + if ( + bodyTypeInResponse === resourceType && + bodyModel.templateArguments && + bodyModel.templateArguments.some((it) => { + return it.kind === "Model" || it.kind === "Union" + ? it === bodyTypeInResponse + : false; + }) + ) { + bodyModel = resourceType; + } + } + } + } + if (resourceType && bodyModel.name === "") { + bodyModel = resourceType; + } + } + return bodyModel!; +} + +function emitBodyParameter(program: Program, httpOperation: HttpOperation): BodyParameter { + const params = httpOperation.parameters; + const body = params.body!; const base = emitParamBase(program, body.parameter ?? body.type); let contentTypes = body.contentTypes; if (contentTypes.length === 0) { @@ -334,16 +373,10 @@ function emitBodyParameter(program: Program, body: HttpOperationRequestBody, ope if (contentTypes.length !== 1) { throw Error("Currently only one kind of content-type!"); } - let type; - const resourceOperation = getResourceOperation(program, operation); - if (resourceOperation) { - type = getType(program, resourceOperation.resourceType); - } else { - type = getType(program, body.type); - } + const type = getType(program, getBodyType(program, httpOperation)); if (type.type === "model" && type.name === "") { - type.name = capitalize(operation.name) + "Request"; + type.name = capitalize(httpOperation.operation.name) + "Request"; } return { @@ -635,7 +668,7 @@ function emitBasicOperation(program: Program, operation: Operation, operationGro if (httpOperation.parameters.body === undefined) { bodyParameter = undefined; } else { - bodyParameter = emitBodyParameter(program, httpOperation.parameters.body, operation); + bodyParameter = emitBodyParameter(program, httpOperation); if (parameters.filter((e) => e.restApiName.toLowerCase() === "content-type").length === 0) { parameters.push(emitContentTypeParameter(bodyParameter, isOverload, isOverriden)); } @@ -1256,7 +1289,8 @@ function getNamespaces(context: DpgContext): Set { function emitCodeModel(context: EmitContext) { const dpgContext = createDpgContext(context); - const clientNamespaceString = getClientNamespaceString(dpgContext); + let clientNamespaceString = getClientNamespaceString(dpgContext); + if (clientNamespaceString) clientNamespaceString = clientNamespaceString.toLowerCase(); // Get types const codeModel: Record = { namespace: clientNamespaceString, From c01090e27019c4914aeb4689c13610f5c9b8e469 Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Mon, 9 Jan 2023 14:22:05 +0800 Subject: [PATCH 3/5] remove cadl --- .../azure-core-foundations-extensions.cadl | 268 -------------- .../adp/Adp.Shared/cadl-project.yaml | 29 -- .../adp/Adp.Shared/classification/main.cadl | 2 - .../adp/Adp.Shared/classification/models.cadl | 31 -- .../cadl-python/adp/Adp.Shared/client.cadl | 6 - .../cadl-python/adp/Adp.Shared/common.cadl | 5 - .../LongRunningOperations_GetStatus.json | 37 -- packages/cadl-python/adp/Adp.Shared/main.cadl | 20 -- .../cadl-python/adp/Adp.Shared/models.cadl | 167 --------- .../adp/Adp.Shared/operations.cadl | 12 - .../cadl-python/adp/Adp.Shared/package.json | 44 --- packages/cadl-python/adp/Core/.prettierrc | 32 -- .../cadl-python/adp/Core/cadl-project.yaml | 23 -- packages/cadl-python/adp/Core/cadl.md | 22 -- .../adp/Core/classification/main.cadl | 5 - .../adp/Core/classification/models.cadl | 37 -- .../adp/Core/classification/operations.cadl | 36 -- packages/cadl-python/adp/Core/client.cadl | 276 -------------- ...ClassificationSchemaOperations_Create.json | 47 --- ...ClassificationSchemaOperations_Delete.json | 39 -- .../ClassificationSchemaOperations_Get.json | 27 -- ...ClassificationSchemaOperations_GetAll.json | 41 --- .../2023-00-00-preview/CreateSample.json | 42 --- .../CreateSampleClassification.json | 34 -- ...StreamClassificationOperations_Create.json | 54 --- ...StreamClassificationOperations_Delete.json | 45 --- ...ataStreamClassificationOperations_Get.json | 29 -- ...StreamClassificationOperations_GetAll.json | 33 -- .../DataStreamFileOperations_Generate.json | 38 -- .../DataStreamFileOperations_GetAll.json | 24 -- ...ogsContainerOperations_GetWritableUri.json | 16 - .../DataStreamOperations_ClearContent.json | 55 --- .../DataStreamOperations_Complete.json | 65 ---- .../DataStreamOperations_Create.json | 79 ---- .../DataStreamOperations_Fail.json | 65 ---- .../DataStreamOperations_FindByLineage.json | 64 ---- .../DataStreamOperations_FindByTags.json | 54 --- .../DataStreamOperations_Get.json | 43 --- .../DataStreamOperations_GetAll.json | 67 ---- ...mOperations_GetLineageGraphsByLineage.json | 73 ---- .../DataStreamOperations_StageFiles.json | 39 -- ...reamStorageOperations_CreateOrReplace.json | 69 ---- .../DataStreamStorageOperations_Get.json | 40 --- ...StorageOperations_GetWithWritableUris.json | 40 --- ...aStreamTagsOperations_CreateOrReplace.json | 39 -- .../DataStreamTagsOperations_Get.json | 23 -- .../2023-00-00-preview/DeleteSample.json | 25 -- .../DeleteSampleClassification.json | 26 -- .../DiscoveryOperations_Cancel.json | 48 --- .../DiscoveryOperations_Complete.json | 48 --- .../DiscoveryOperations_CreateOrReplace.json | 39 -- .../DiscoveryOperations_Get.json | 29 -- .../DiscoveryResultUploadOperations_List.json | 38 -- ...scoverySpecialFileOperations_Generate.json | 44 --- .../DiscoverySpecialFileOperations_List.json | 36 -- ...pecialFileOperations_ListWritableUris.json | 36 -- .../2023-00-00-preview/GetSampleById.json | 28 -- .../GetSampleClassification.json | 26 -- .../ListSampleClassifications.json | 41 --- .../2023-00-00-preview/ListSamples.json | 46 --- .../LongRunningOperationStatus.json | 37 -- .../LongRunningOperations_GetStatus.json | 38 -- ...rementClassificationOperations_Create.json | 48 --- ...rementClassificationOperations_Delete.json | 40 --- ...asurementClassificationOperations_Get.json | 28 -- ...rementClassificationOperations_GetAll.json | 32 -- ...ntMetadataFileInfoOperations_Complete.json | 47 --- ...urementMetadataFileInfoOperations_Get.json | 27 -- ...dataFileInfoOperations_GetWritableUri.json | 27 -- .../MeasurementMetadataOperations_Get.json | 29 -- ...tMetadataSchemaFileInfoOperations_Get.json | 26 -- .../MeasurementOperations_Delete.json | 39 -- .../MeasurementOperations_FindByIds.json | 32 -- .../MeasurementOperations_Get.json | 33 -- .../MeasurementOperations_GetAll.json | 37 -- ...rovideMetadataFileDownloadInformation.json | 26 -- ..._ProvideMetadataFileUploadInformation.json | 26 -- ...rations_QueryMeasurementsWithMetadata.json | 42 --- ...rementProcessingResultsOperations_Get.json | 38 -- ...MeasurementStateMachineOperations_Act.json | 49 --- ...MeasurementStateMachineOperations_Get.json | 30 -- ...surementStateMachineOperations_GetAll.json | 34 -- .../2023-00-00-preview/RunSampleWorkflow.json | 25 -- .../SetLabelsWithPatch.json | 40 --- .../UploadDataFileOperations_Generate.json | 45 --- .../UploadDataFileOperations_GetAll.json | 35 -- ...adDataFileOperations_ListWritableUris.json | 35 -- .../UploadOperations_Cancel.json | 49 --- .../UploadOperations_Complete.json | 49 --- .../UploadOperations_CreateOrReplace.json | 42 --- .../UploadOperations_Get.json | 30 -- ...oadResultMeasurementOperations_GetAll.json | 33 -- .../UploadSpecialFileOperations_Generate.json | 44 --- .../UploadSpecialFileOperations_GetAll.json | 35 -- ...pecialFileOperations_ListWritableUris.json | 35 -- .../adp/Core/ingestion/discovery/main.cadl | 3 - .../adp/Core/ingestion/discovery/models.cadl | 138 ------- .../Core/ingestion/discovery/operations.cadl | 67 ---- .../cadl-python/adp/Core/ingestion/main.cadl | 3 - .../adp/Core/ingestion/upload/main.cadl | 3 - .../adp/Core/ingestion/upload/models.cadl | 198 ---------- .../adp/Core/ingestion/upload/operations.cadl | 92 ----- packages/cadl-python/adp/Core/main.cadl | 17 - .../Core/measurement/classification/main.cadl | 3 - .../measurement/classification/models.cadl | 20 -- .../classification/operations.cadl | 35 -- .../data-stream/classification/main.cadl | 3 - .../data-stream/classification/models.cadl | 21 -- .../classification/operations.cadl | 35 -- .../Core/measurement/data-stream/main.cadl | 3 - .../Core/measurement/data-stream/models.cadl | 340 ------------------ .../measurement/data-stream/operations.cadl | 159 -------- .../adp/Core/measurement/main.cadl | 6 - .../adp/Core/measurement/models.cadl | 261 -------------- .../adp/Core/measurement/operations.cadl | 121 ------- packages/cadl-python/adp/Core/models.cadl | 12 - packages/cadl-python/adp/Core/operations.cadl | 17 - packages/cadl-python/adp/Core/package.json | 182 ---------- 118 files changed, 5847 deletions(-) delete mode 100644 packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/cadl-project.yaml delete mode 100644 packages/cadl-python/adp/Adp.Shared/classification/main.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/classification/models.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/client.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/common.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json delete mode 100644 packages/cadl-python/adp/Adp.Shared/main.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/models.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/operations.cadl delete mode 100644 packages/cadl-python/adp/Adp.Shared/package.json delete mode 100644 packages/cadl-python/adp/Core/.prettierrc delete mode 100644 packages/cadl-python/adp/Core/cadl-project.yaml delete mode 100644 packages/cadl-python/adp/Core/cadl.md delete mode 100644 packages/cadl-python/adp/Core/classification/main.cadl delete mode 100644 packages/cadl-python/adp/Core/classification/models.cadl delete mode 100644 packages/cadl-python/adp/Core/classification/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/client.cadl delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json delete mode 100644 packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json delete mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/main.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/models.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/main.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/upload/main.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/upload/models.cadl delete mode 100644 packages/cadl-python/adp/Core/ingestion/upload/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/main.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/classification/main.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/classification/models.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/classification/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/main.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/models.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/main.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/models.cadl delete mode 100644 packages/cadl-python/adp/Core/measurement/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/models.cadl delete mode 100644 packages/cadl-python/adp/Core/operations.cadl delete mode 100644 packages/cadl-python/adp/Core/package.json diff --git a/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl b/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl deleted file mode 100644 index 0bfb93f38e6..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/azure-core-foundations-extensions.cadl +++ /dev/null @@ -1,268 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.Core; -using Azure.Core.Foundations; -using Adp; - -@versioned(Versions) -@versionedDependency( - [[Versions.v1_0_Preview_1, Adp.Versions.v2023_00_00_for_public_preview]] -) -namespace Azure.Core.Foundations.Extensions; - -enum Versions { - v1_0_Preview_1, -} - -/* - This CADL file was created to customize the existing implementation from the foundations library. - In this file we have addressed the following issues: - 1. Avoid inlining of the models - required by ADP backend and also by the AutoRest. All models must be references and have schema definitions in the OpenApi spec. - 2. In ADP we are using slightly different model for LRO. It has additional state [Created] and the operation type property. - 3. The `CustomBodyWrapper` just adds the `@doc` to the body element to suppress warnings during the spec validation. - 4. The `CustomResourceOkResponse` wraps the with `@body`. - 5. The `CustomErrorResponse` adds missing header `x-ms-error-code` to the default error response - 6. For all LRO operations - add operation status location header and OK response where necessary to align with AutoRest code generator. - 7. The `CustomSingletonResource` has been introduced to allow operations on singleton child resources that have no identifier. -*/ - -@doc(""" -Note, by adding this model we solve AutoRest validation issue. -Autorest requires that required properties will not be read-only. - -Provides the 'ETag' field to enable conditional (cached) requests. This model can be spread -into responses and item models to convey the ETag when it cannot simplybe conveyed in a header. -""") -model CustomEtagProperty { - @visibility("read", "update") - @doc("The entity tag for this resource.") - etag: string; -} - -@doc("List {name} resources", TResource) -op CustomResourceList< - TResource extends object, - TCustom extends Foundations.CustomizationFields = {} -> is Foundations.ResourceList< - TResource, - Foundations.CustomParameters, - Page ->; - -@doc("Creates or replaces a {name}", TResource) -@createsOrReplacesResource(TResource) -op CustomResourceCreateOrReplace< - TResource extends object, - TResourceCreateParams extends object -> is Foundations.ResourceOperation< - TResource, - TResourceCreateParams, - CustomResourceCreatedOrOkResponse ->; - -@doc("A wrapper for optional parameter in the body. The intent of model is to add description to 'body'") -model CustomBodyWrapper { - @doc("Parameter of type '{name}' in the body.", T) - @body - body?: T; -} - -@doc("A wrapper for required parameter in the body. The intent of model is to add description to 'body' and make it requred.") -model CustomRequiredBodyWrapper { - @doc("Parameter of type '{name}' in the body.", T) - @body - body: T; -} - -@doc("A {name} resource was successfully created.", T) -model CustomResourceCreatedResponse { - ...Cadl.Http.Response<201>; - @body body: T; -} - -model CustomResourceOkResponse { - ...Cadl.Http.Response<200>; - @body body: T; -} - -alias CustomResourceCreatedOrOkResponse = CustomResourceCreatedResponse | CustomResourceOkResponse; - -@autoRoute -@doc("Creates a {name}.", TResource) -@createsResource(TResource) -op CustomLongRunningResourceCreateUsingHttpPost< - TResource extends object, - TResourceCreateParams extends object = {}, - TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders ->( - ...Foundations.CollectionKeysOf, - ...TResourceCreateParams, - ...Foundations.ApiVersionParameter, - ...Foundations.CustomParameters, - ...LongRunningOperationIdHeader -): (AcceptedResponse> & - Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; - -@autoRoute -@doc("Creates a {name}", TResource) -@createsResource(TResource) -op CustomLongRunningResourceCreateWithServiceProvidedName< - TResource extends object, - TResourceCreateParams extends object = {}, - TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders ->( - ...Foundations.CollectionKeysOf, - ...TResourceCreateParams, - ...Foundations.ApiVersionParameter, - ...Foundations.CustomParameters, - ...LongRunningOperationIdHeader -): (AcceptedResponse> & - Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; - -@action -@autoRoute -@actionSeparator(":") -@doc( - "Runs a custom action on {name} as long-running operation (LRO)", - TResource -) -op CustomLongRunningResourceAction< - TResource extends object, - TRequestParameters extends object = {}, - TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders ->( - ...Foundations.ItemKeysOf, - ...TRequestParameters, - ...Foundations.ApiVersionParameter, - ...Foundations.CustomParameters, - ...LongRunningOperationIdHeader -): (AcceptedResponse> & - Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; - -@action -@autoRoute -@actionSeparator(":") -@doc( - "Runs a custom action on {name} as long-running operation (LRO)", - TResource -) -op CustomLongRunningResourceActionWithParameters< - TResource extends object, - TParams extends object = {}, - TCustom extends Foundations.CustomizationFields = CustomPostLroRequestResponseHeaders ->( - ...Foundations.ItemKeysOf, - ...TParams, - ...Foundations.ApiVersionParameter, - ...Foundations.CustomParameters, - ...LongRunningOperationIdHeader -): (AcceptedResponse> & - Foundations.CustomResponseFields) | CustomResourceOkResponse | CustomErrorResponse; - -#suppress "@azure-tools/cadl-azure-resource-manager/no-response-body" "This operation must return a status monitor in its response." -@autoRoute -@collectionAction(TResource) -@actionSeparator(":") -op CustomLongRunningResourceCollectionAction< - TResource extends object, - TParams extends object = {}, - TResponse extends object = TResource -> is Foundations.ResourceCollectionOperation< - TResource, - TParams & LongRunningOperationIdHeader & CustomRepeatabilityRequestHeaders, - (AcceptedResponse> & - CustomRepeatabilityResponseHeaders & - LongRunningOperationStatusLocationHeader) | CustomResourceOkResponse ->; - -#suppress "@azure-tools/cadl-azure-resource-manager/no-response-body" "We do support bodies in data plane service APIs..." -@delete -@autoRoute -@doc("Delete a {name} asynchronously.", TResource) -@deletesResource(TResource) -op CustomLongRunningResourceDelete( - ...Foundations.ItemKeysOf, - ...Foundations.ApiVersionParameter, - ...LongRunningOperationIdHeader -): (AcceptedResponse> & - LongRunningOperationStatusLocationHeader) | NoContentResponse | CustomErrorResponse; - -@doc("Error response with 'x-ms-error-code' header.") -@friendlyName("CustomErrorResponse") -model CustomErrorResponse is Foundations.ErrorResponse { - ...XmsErrorCodeHeader; -} - -@autoRoute -@get -op CustomSingletonResourceRead< - TResource extends object, - TParams extends object = {}, - TResponse extends object = TResource -> is Foundations.ResourceCollectionOperation< - TResource, - TParams, - CustomResourceOkResponse ->; - -@doc("Creates or replaces a {name}", TResource) -@createsOrReplacesResource(TResource) -@autoRoute -op CustomSingletonResourceCreateOrReplace< - TResource extends object, - TParams extends object, - TResponse extends object = TResource -> is Foundations.ResourceCollectionOperation< - TResource, - TParams, - CustomResourceCreatedOrOkResponse ->; - -@doc("Indicates whether the repeatable request was accepted or rejected.") -enum RepeatabilityResult { - "accepted", - "rejected", -} - -@doc("Provides the 'Repeatability-Result' header to enable repeatable requests.") -model CustomRepeatabilityResponseHeaders { - @visibility("read") - @header("Repeatability-Result") - @doc("Indicates whether the repeatable request was accepted or rejected.") - repeatabilityResult?: RepeatabilityResult; -} - -@doc("Provides the 'Repeatability-*' headers to support repeatability for POST requests.") -model CustomPostLroRequestResponseHeaders { - @doc("Provides the 'Repeatability-*' headers to enable repeatable requests.") - parameters: CustomRepeatabilityRequestHeaders; - - @doc("Provides the 'Repeatability-Result' and 'Operation-Location' headers to support repeatability for POST LRO.") - response: CustomRepeatabilityResponseHeaders & - LongRunningOperationStatusLocationHeader; -} - -@doc(""" - Provides the 'Repeatability-*' headers to support repeatability for POST requests. - - TODO: Remove this customized model after upgrading to new csharp emitter - with fix for the following issue: https://github.com/Azure/autorest.csharp/issues/2970 - and use the existing "Azure.Core.RepeatabilityRequestHeaders" instead. - """) -model CustomRepeatabilityRequestHeaders { - @visibility("create", "update", "delete") - @header("Repeatability-Request-ID") - @doc("An opaque, globally-unique, client-generated string identifier for the request.") - repeatabilityRequestId?: string; - - @visibility("create", "update", "delete") - @doc("Specifies the date and time at which the request was first created.") - @header("Repeatability-First-Sent") - repeatabilityFirstSent?: zonedDateTime; - - @visibility("create", "update", "delete") - @doc("An opaque, globally-unique, client-generated string identifier for the client.") - @header("Repeatability-Client-ID") - repeatabilityClientId?: string; -} diff --git a/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml b/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml deleted file mode 100644 index 659f4a7220a..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/cadl-project.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Custom parameters for ADP Core project -# Allows composition of the output directory for each emitter -parameters: - api-kind: - default: "data-plane" - api-version-kind: - default: "preview" - api-namespace: - default: "Adp.Shared" - -output-dir: "{project-root}" - -emit: - - "@azure-tools/cadl-autorest" - - "@azure-tools/cadl-csharp" - -options: - "@azure-tools/cadl-autorest": - emitter-output-dir: "{output-dir}/../{api-kind}/{api-namespace}/{api-version-kind}" - output-file: adp-shared-api.json - examples-directory: ./examples - - "@azure-tools/cadl-csharp": - emitter-output-dir: "{output-dir}/../../../../../clients/Shared/Clients.Shared.vDraftCompliant" - library-name: "Azure.Adp.Clients.Shared.vDraftCompliant" - namespace: "Microsoft.Azure.Adp.Clients.Shared.vDraftCompliant" - clear-output-folder: true - new-project: false - model-namespace: true diff --git a/packages/cadl-python/adp/Adp.Shared/classification/main.cadl b/packages/cadl-python/adp/Adp.Shared/classification/main.cadl deleted file mode 100644 index c3cbbf1b4dd..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/classification/main.cadl +++ /dev/null @@ -1,2 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/classification/models.cadl b/packages/cadl-python/adp/Adp.Shared/classification/models.cadl deleted file mode 100644 index 7c1e3fe1bdc..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/classification/models.cadl +++ /dev/null @@ -1,31 +0,0 @@ -using Cadl.Http; -using Azure.Core; - -namespace Adp; - -@doc("Classification resource.") -model Classification { - @doc("Classification schema name.") - @key - @minLength(1) - @maxLength(256) - schemaName: string; - - @doc("Classification object model (JSON as string)") - @visibility("read", "create") - @minLength(2) - classificationObject: string; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("Represents sample classification parameters.") -model ClassificationQueryParameters { - ...Foundations.CollectionKeysOf; - - @doc("Classification schema name.") - @key - @path - @minLength(1) - @maxLength(256) - schemaName: string; -} diff --git a/packages/cadl-python/adp/Adp.Shared/client.cadl b/packages/cadl-python/adp/Adp.Shared/client.cadl deleted file mode 100644 index 7f3de57c18a..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/client.cadl +++ /dev/null @@ -1,6 +0,0 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/openapi"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; - -import "./main.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/common.cadl b/packages/cadl-python/adp/Adp.Shared/common.cadl deleted file mode 100644 index c67e37d01a5..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/common.cadl +++ /dev/null @@ -1,5 +0,0 @@ -import "./models.cadl"; -import "./operations.cadl"; -import "./classification/models.cadl"; - -import "./azure-core-foundations-extensions.cadl"; diff --git a/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json b/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json deleted file mode 100644 index f55e5d6389e..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "operationId": "LongRunningOperations_GetStatus", - "title": "Get status of the long running operation. (LRO)", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "headers": { - "Retry-After": 5 - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000001", - "status": "Failed", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Adp.Shared/main.cadl b/packages/cadl-python/adp/Adp.Shared/main.cadl deleted file mode 100644 index 7bef8b1de7a..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/main.cadl +++ /dev/null @@ -1,20 +0,0 @@ -import "./common.cadl"; - -using Cadl.Http; -using Cadl.Versioning; - -@versioned(Adp.Versions) -@versionedDependency( - [ - [ - Adp.Versions.v2023_00_00_for_public_preview, - Azure.Core.Versions.v1_0_Preview_1 - ] - ] -) -@service({ - title: "Adp", - version: "2023-00-00-preview", -}) -@useAuth(OAuth2Auth<[ImplicitAuthorizationFlow]>) -namespace Adp.Shared; diff --git a/packages/cadl-python/adp/Adp.Shared/models.cadl b/packages/cadl-python/adp/Adp.Shared/models.cadl deleted file mode 100644 index 5c715eafe8b..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/models.cadl +++ /dev/null @@ -1,167 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.Core; - -@versioned(Adp.Versions) -@versionedDependency( - [ - [ - Adp.Versions.v2023_00_00_for_public_preview, - Azure.Core.Versions.v1_0_Preview_1 - ] - ] -) -namespace Adp; - -enum Versions { - v2023_00_00_for_public_preview: "2023-00-00-preview", -} - -enum SharedClients { - LongRunningOperationsClient, -} - -@doc("Internal - generic Key/Value model for internal use") -model CommonKeyValuePair { - @doc("The key") - @key - key: string; - - @doc("The value") - value: string; -} - -@doc("Internal - the model for internal use") -model CommonResourceEndpoint { - @doc("The endpoint uri of the owning resource") - @visibility("read") - resourceEndpoint?: url; -} - -@doc("File upload information") -model FileUploadInformation { - @doc("File name specified by the client") - @key - clientFileName: string; - ...FileLocation; -} - -@doc("File location.") -model FileLocation { - @doc(""" - SAS signed URI for uploading (write) file to Azure Storage. - This URI expires in 24 hours. - """) - fileUri: url; -} - -@doc("Error code header.") -model XmsErrorCodeHeader { - @doc("Error code for specific error that occurred.") - @header("x-ms-error-code") - xmsErrorCode: string; -} - -@doc("Azure Active Directory OAuth2 Flow") -model ImplicitAuthorizationFlow { - @doc("Use implicit authorization flow type") - type: OAuth2FlowType.implicit; - - @doc("Authorization URL") - authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize"; - - @doc("ADP Scope: impersonate user account") - scopes: ["https://adp.azure.com/.default"]; -} - -@doc("A long running operation resource.") -@resource("operations") -model LongRunningOperation { - @key("operationId") - @doc("The unique ID of the operation.") - @minLength(1) - @maxLength(36) - operationId: string; - ...LongRunningOperationBase; -} - -@doc("Standard Azure LRO response headers.") -model LongRunningOperationWithResponseHeaders { - ...LongRunningOperation; - ...Foundations.RetryAfterHeader; - ...LongRunningOperationResultLocation; -} - -@doc("The long running operation status monitor location.") -model LongRunningOperationStatusLocationHeader { - @pollingLocation - @doc("The location for monitoring the operation status.") - @header("Operation-Location") - operationLocation: ResourceLocation; -} - -@doc("Final location of the operation result.") -model LongRunningOperationResultLocation { - @doc("Final location of the operation result.") - @finalLocation - @header("Location") - location?: url; -} - -@doc(""" -Client specific long running operation identifier. -This identifier will serve as idempotence key to ensure idempotensy of the long running operation. -""") -model LongRunningOperationIdHeader { - @doc("The long running operation identifier. Operation-Id should be valid UUID string.") - @format("uuid") - @header("operation-id") - operationId?: string; -} - -@doc("The ARM resource identifier. The ARM Id could be used for checking access permission to the operations associated with that resource.") -model ArmResourceId { - @doc("The ARM resource identifier. The ARM Id could be used for checking access permission to the operations associated with that resource.") - @visibility("read", "create") - armResourceId?: string; -} - -@doc("The long running operation model without the key.") -model LongRunningOperationBase { - @doc("The operation status.") - @visibility("read", "update") - status: LongRunningOperationStatus; - - @doc("The operation error.") - @visibility("update") - error?: TStatusError; - - @doc("Final result location (URL).") - @visibility("read", "update", "create") - finalResultLocation: url; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("The long running operation response") -model LongRunningOperationResponse { - @doc("The operation Id.") - @minLength(1) - @maxLength(36) - operationId: string; - ...LongRunningOperationBase; -} - -@doc("The async operation status") -enum LongRunningOperationStatus { - Created, - InProgress, - Succeeded, - Failed, - Canceled, -} - -@doc("[Internal] Static identifier used by singleton resources.") -enum SingletonIdentifier { - current, -} diff --git a/packages/cadl-python/adp/Adp.Shared/operations.cadl b/packages/cadl-python/adp/Adp.Shared/operations.cadl deleted file mode 100644 index 9413c5a659c..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/operations.cadl +++ /dev/null @@ -1,12 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Autorest; - -namespace Adp.Shared; - -@tag("Long Running Operation") -interface LongRunningOperations { - @doc("Get the details of an LRO.") - getStatus is ResourceRead; -} diff --git a/packages/cadl-python/adp/Adp.Shared/package.json b/packages/cadl-python/adp/Adp.Shared/package.json deleted file mode 100644 index 622c3c855e0..00000000000 --- a/packages/cadl-python/adp/Adp.Shared/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@cadl-api-spec/adp-shared", - "version": "0.1.0", - "description": "ADP Shared API", - "private": true, - "main": "index.js", - "cadlMain": "client.cadl", - "config": { - "verbose": " -Verbose", - "OutputDirectory": "../data-plane/Adp.Shared", - "OutputFile": "preview/2023-00-00-preview/adp-shared-api.json", - "ClientPath": "../../../../../clients/Shared/Clients.Shared.vDraftCompliant", - "ClientNamespace": "Microsoft.Azure.Adp.Shared.Clients.vDraftCompliant", - "PublishOutputFileName": "../../../../draftcompliant/apispec.core.shared.2022-11-30-draftcompliant.json", - "AutorestManifestFile": "../src/scripts/autorest.md" - }, - "scripts": { - "lint": "cadl compile . --warn-as-error --import @cadl-lang/library-linter --no-emit", - "validate": "npm run _validateOpenApiSpec && npm run _validateExamples", - "build": "npm run format && npx cadl compile . && npm run validate", - "publish": "pwsh ../src/scripts/publish.ps1 %npm_package_config_verbose% -SourceOpenApiSpecPath %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile% -OutputOpenApiSpecPath %npm_package_config_PublishOutputFileName%", - "_generateAutorestClient": "pwsh ../src/scripts/generate-autorest-client.ps1 -InputOpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile% -OutputPath %npm_package_configClientPath%/generated -Namespace %npm_package_configClientNamespace% -AutorestManifestFile %npm_package_config_AutorestManifestFile%", - "_validateOpenApiSpec": "pwsh ../src/scripts/validate-spec.ps1 -OpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile%", - "_validateExamples": "pwsh ../src/scripts/validate-examples.ps1 -OpenApiSpecFile %npm_package_config_OutputDirectory%/%npm_package_config_OutputFile%", - "format": "npx cadl format --pretty ./**/*.cadl" - }, - "keywords": [], - "author": "Microsoft Corporation", - "license": "MIT", - "devDependencies": { - "@cadl-lang/openapi": "~0.38.0", - "@cadl-lang/openapi3": "~0.38.0", - "@cadl-lang/rest": "0.38.0", - "@cadl-lang/versioning": "~0.38.0", - "@azure-tools/cadl-autorest": "~0.24.0", - "@azure-tools/cadl-azure-core": "~0.24.0", - "@cadl-lang/compiler": "0.38.5", - "@azure-tools/cadl-dpg": "~0.24.0", - "@azure-tools/cadl-csharp": "0.1.11-beta.20221229.1", - "avocado": "1.0.0", - "prettier": "^2.7.1", - "@cadl-lang/library-linter": "~0.38.0" - } -} diff --git a/packages/cadl-python/adp/Core/.prettierrc b/packages/cadl-python/adp/Core/.prettierrc deleted file mode 100644 index 33160e62e6c..00000000000 --- a/packages/cadl-python/adp/Core/.prettierrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "overrides": [ - { - "files": [ - "specification/**/*.json", - "documentation/swagger-bootstrap.json", - "documentation/samplefiles/**/*.json" - ], - "options": { - "plugins": [ - "./src/scripts/prettier-swagger-plugin.ts" - ], - "parser": "json-swagger", - "printWidth": 20, - "endOfLine": "auto" - } - }, - { - "files": [ - "**/*.json" - ], - "options": { - "parser": "json", - "printWidth": 20, - "endOfLine": "auto" - }, - "excludeFiles": [ - "specification/**/*.json" - ] - } - ] -} diff --git a/packages/cadl-python/adp/Core/cadl-project.yaml b/packages/cadl-python/adp/Core/cadl-project.yaml deleted file mode 100644 index cba046773b4..00000000000 --- a/packages/cadl-python/adp/Core/cadl-project.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Custom parameters for ADP Core project -# Allows composition of the output directory for each emitter -parameters: - api-kind: - default: "data-plane" - api-version-kind: - default: "preview" - api-namespace: - default: "Adp.Core" - -output-dir: "{project-root}" - -emit: - - "@azure-tools/cadl-csharp" - -options: - "@azure-tools/cadl-csharp": - emitter-output-dir: "sdk/adp/Azure.Adp.Clients.Core.vDraftCompliant/src" - library-name: "Azure.Adp.Clients.Core.vDraftCompliant" - namespace: "Microsoft.Azure.Adp.Clients.Core.vDraftCompliant" - clear-output-folder: true - new-project: false - model-namespace: true diff --git a/packages/cadl-python/adp/Core/cadl.md b/packages/cadl-python/adp/Core/cadl.md deleted file mode 100644 index 9500b2405b0..00000000000 --- a/packages/cadl-python/adp/Core/cadl.md +++ /dev/null @@ -1,22 +0,0 @@ -# ADP data plane API CADL project - -## Overview - -This CADL project used to define API specs for Autonomous Development Platform (ADP) services. - -## Generating API Specs - -1. Run `npm install` to install required NPM packages. -1. Run `npm run` to see available targets. -1. Run desired target using `npm run ` command. - -## Authoring CADL - -- [Installing VS Code Extension](https://github.com/microsoft/cadl#installing-vs-code-extension) -- [Cadl Language Tour](https://github.com/microsoft/cadl/blob/main/docs/tutorial.md) -- [Repository Guidelines for Cadl Specs](https://github.com/Azure/azure-rest-api-specs-pr/blob/main/documentation/cadl-structure-guidelines.md) - -## Dependencies - -- [Microsft/Cadl](https://github.com/microsoft/cadl) - A repo which defines the cadl compiler and core language constructs. -- [Azure/cadl-azure](https://github.com/Azure/cadl-azure) - A repo which defines common Azure-specific Cadl libraries. diff --git a/packages/cadl-python/adp/Core/classification/main.cadl b/packages/cadl-python/adp/Core/classification/main.cadl deleted file mode 100644 index 2259c5330c2..00000000000 --- a/packages/cadl-python/adp/Core/classification/main.cadl +++ /dev/null @@ -1,5 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; - -// Consider moving classifications to Adp.Shared library diff --git a/packages/cadl-python/adp/Core/classification/models.cadl b/packages/cadl-python/adp/Core/classification/models.cadl deleted file mode 100644 index 4331c7e8e94..00000000000 --- a/packages/cadl-python/adp/Core/classification/models.cadl +++ /dev/null @@ -1,37 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; - -namespace Adp.Core.ClassificationSchema; - -enum ClassificationSchemaClients { - ClassificationSchemaClient, -} - -@doc("Classification schema identifier.") -model ClassificationSchemaIdentifier { - @doc("Classification schema identifier.") - @key - @minLength(1) - @maxLength(256) - name: string; -} - -@doc("Classification schema resource model.") -@resource("classificationSchemas") -model ClassificationSchema { - ...ClassificationSchemaIdentifier; - - @doc("Classification schema definition (JSON schema as string).") - @visibility("read", "create") - @minLength(2) - schemaDefinition: string; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("{name} resource creation parameters.", ClassificationSchema) -@withVisibility("create") -@withoutOmittedProperties("name") -model ClassificationSchemaCreationParameters { - ...ClassificationSchema; -} diff --git a/packages/cadl-python/adp/Core/classification/operations.cadl b/packages/cadl-python/adp/Core/classification/operations.cadl deleted file mode 100644 index ed937af3bc2..00000000000 --- a/packages/cadl-python/adp/Core/classification/operations.cadl +++ /dev/null @@ -1,36 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.ClassificationSchema; - -@tag("Classification Schema") -interface ClassificationSchemaOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource read operation." - @doc("Get classification schema by name.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO POST action for creating resources." - @doc("Creates new classification schema.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - create is CustomLongRunningResourceCreateUsingHttpPost< - ClassificationSchema, - CustomBodyWrapper - >; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO DELETE action for deleting resources." - @doc("Deletes the classification schema and all related classification assignments (instances).") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - delete is CustomLongRunningResourceDelete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("List all classification schemas.") - getAll is CustomResourceList; -} diff --git a/packages/cadl-python/adp/Core/client.cadl b/packages/cadl-python/adp/Core/client.cadl deleted file mode 100644 index 2eef1a90ed8..00000000000 --- a/packages/cadl-python/adp/Core/client.cadl +++ /dev/null @@ -1,276 +0,0 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/openapi"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-dpg"; - -import "./main.cadl"; - -using Azure.DPG; -using Cadl.Rest.Private; - -namespace Adp.Sdk.DotNet.Core { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @client({ - name: "CoreClient", - service: Adp.Core, - }) - interface Core - extends Adp.Sdk.DotNet.Internal.LongRunningOperation, - Adp.Sdk.DotNet.Internal.Discovery, - Adp.Sdk.DotNet.Internal.Upload, - Adp.Sdk.DotNet.Internal.ClassificationSchema, - Adp.Sdk.DotNet.Internal.Measurement, - Adp.Sdk.DotNet.Internal.MeasurementClassification, - Adp.Sdk.DotNet.Internal.DataStream, - Adp.Sdk.DotNet.Internal.DataStreamClassification {} -} - -namespace Adp.Sdk.DotNet.Internal { - interface LongRunningOperation { - @convenienceAPI - getLongRunning is Adp.Shared.LongRunningOperations.getStatus; - } - - interface ClassificationSchema { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.create; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - deleteClassificationSchema is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.delete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getClassificationSchemas is Adp.Core.ClassificationSchema.ClassificationSchemaOperations.getAll; - } - - interface Discovery { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createOrReplaceDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.createOrReplace; - - @convenienceAPI - getDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("complete") - completeDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.complete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("cancel") - cancelDiscovery is Adp.Core.Ingestion.Discovery.DiscoveryOperations.cancel; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("listWritableUris") - getDiscoverySpecialFileUploadLocations is Adp.Core.Ingestion.Discovery.DiscoverySpecialFileOperations.listWritableUris; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("generate") - generateDiscoverySpecialFileUploadLocations is Adp.Core.Ingestion.Discovery.DiscoverySpecialFileOperations.generate; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getAllDiscoveryUploads is Adp.Core.Ingestion.Discovery.DiscoveryResultUploadOperations.list; - } - - interface Upload { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createOrReplaceUpload is Adp.Core.Ingestion.Upload.UploadOperations.createOrReplace; - - @convenienceAPI - getUpload is Adp.Core.Ingestion.Upload.UploadOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("complete") - completeUpload is Adp.Core.Ingestion.Upload.UploadOperations.complete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("cancel") - cancelUpload is Adp.Core.Ingestion.Upload.UploadOperations.cancel; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("generate") - generateUploadSpecialFiles is Adp.Core.Ingestion.Upload.UploadSpecialFileOperations.generate; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("listWritableUris") - getUploadSpecialFiles is Adp.Core.Ingestion.Upload.UploadSpecialFileOperations.listWritableUris; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("generate") - generateUploadDataFiles is Adp.Core.Ingestion.Upload.UploadDataFileOperations.generate; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("listWritableUris") - getUploadDataFiles is Adp.Core.Ingestion.Upload.UploadDataFileOperations.listWritableUris; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - listMeasurements is Adp.Core.Ingestion.Upload.UploadResultMeasurementOperations.getAll; - } - - interface Measurement { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurement is Adp.Core.Measurement.MeasurementOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - deleteMeasurement is Adp.Core.Measurement.MeasurementOperations.delete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurements is Adp.Core.Measurement.MeasurementOperations.getAll; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("queryMeasurementsWithMetadata") - getMeasurementsWithMetadata is Adp.Core.Measurement.MeasurementOperations.queryMeasurementsWithMetadata; - - @convenienceAPI - @actionSegment("findByIds") - getMeasurementsByIds is Adp.Core.Measurement.MeasurementOperations.findByIds; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementMetadata is Adp.Core.Measurement.MeasurementMetadataOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementProcessingResults is Adp.Core.Measurement.MeasurementProcessingResultsOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementStateMachine is Adp.Core.Measurement.MeasurementStateMachineOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementStateMachines is Adp.Core.Measurement.MeasurementStateMachineOperations.getAll; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("act") - actMeasurementStateMachine is Adp.Core.Measurement.MeasurementStateMachineOperations.act; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementMetadataSchemaFileInfo is Adp.Core.Measurement.MeasurementMetadataSchemaFileInfoOperations.get; - } - - interface MeasurementClassification { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getMeasurementClassifications is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.getAll; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - deleteMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.delete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createMeasurementClassification is Adp.Core.Measurement.Classification.MeasurementClassificationOperations.create; - } - - interface DataStream { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createDataStream is Adp.Core.DataStream.DataStreamOperations.create; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getDataStream is Adp.Core.DataStream.DataStreamOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getAllDataStream is Adp.Core.DataStream.DataStreamOperations.getAll; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("clearContent") - clearContentOfDataStream is Adp.Core.DataStream.DataStreamOperations.clearContent; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("stageFiles") - stageFilesForDataStream is Adp.Core.DataStream.DataStreamOperations.stageFiles; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("complete") - completeDataStream is Adp.Core.DataStream.DataStreamOperations.complete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("fail") - failDataStream is Adp.Core.DataStream.DataStreamOperations.fail; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("findByTags") - getDataStreamsByTags is Adp.Core.DataStream.DataStreamOperations.findByTags; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("findByLineage") - getDataStreamsByLineage is Adp.Core.DataStream.DataStreamOperations.findByLineage; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("getLineageGraphsByLineage") - getDataStreamLineageGraphsByLineage is Adp.Core.DataStream.DataStreamOperations.getLineageGraphsByLineage; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createOrReplaceDataStreamStorage is Adp.Core.DataStream.DataStreamStorageOperations.createOrReplace; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("getWithWritableUris") - getDataStreamStorage is Adp.Core.DataStream.DataStreamStorageOperations.getWithWritableUris; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - createOrReplaceDataStreamTags is Adp.Core.DataStream.DataStreamTagsOperations.createOrReplace; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getDataStreamTags is Adp.Core.DataStream.DataStreamTagsOperations.get; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("generate") - generateDataStreamFiles is Adp.Core.DataStream.DataStreamFileOperations.generate; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - getDataStreamFiles is Adp.Core.DataStream.DataStreamFileOperations.getAll; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @convenienceAPI - @actionSegment("getWritableUri") - getDataStreamLogsContainerLocation is Adp.Core.DataStream.DataStreamLogsContainerOperations.getWritableUri; - } - - interface DataStreamClassification {} -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json deleted file mode 100644 index 80d2b5fdf30..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Create.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "operationId": "ClassificationSchemaOperations_Create", - "title": "Create a classification schema resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "00000000-0000-0000-0000-000000000123", - "name": "unique_schema_name", - "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}" - }, - "responses": { - "200": { - "body": { - "name": "unique_schema_name", - "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", - "etag": "string" - } - }, - "202": { - "headers": { - "Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "Operation-Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000123", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json deleted file mode 100644 index 311d45b633b..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Delete.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "ClassificationSchemaOperations_Delete", - "title": "Delete the classification schema resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "name": "unique_name" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000123", - "status": "Deleted", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json deleted file mode 100644 index 7ddf1426f15..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_Get.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "operationId": "ClassificationSchemaOperations_Get", - "title": "Get classification schema definition by schema name.", - "parameters": { - "api-version": "2023-00-00-preview", - "name": "classification_schema_1" - }, - "responses": { - "200": { - "body": { - "name": "classification_schema_1", - "schemaDefinition": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json deleted file mode 100644 index ed02c891046..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ClassificationSchemaOperations_GetAll.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "operationId": "ClassificationSchemaOperations_GetAll", - "title": "List classification schemas. Supports paging.", - "parameters": { - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "classification_schema_1", - "schemaDefinition": "{\"description\": \"Classification schema definition 1 (JSON schema as string).\"}", - "etag": "0x1" - }, - { - "name": "classification_schema_2", - "schemaDefinition": "{\"description\": \"Classification schema definition 2 (JSON schema as string).\"}", - "etag": "0x2" - }, - { - "name": "classification_schema_3", - "schemaDefinition": "{\"description\": \"Classification schema definition 3 (JSON schema as string).\"}", - "etag": "0x3" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json deleted file mode 100644 index 2e15cb5bf66..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSample.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "operationId": "CreateSample", - "title": "Create Sample resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "client-operation-id", - "resource": { - "id": "00000000-0000-0000-0000-000000000001", - "state": "Inactive", - "labels": [ - "some", - "labels" - ] - } - }, - "responses": { - "200": { - "body": { - "id": "00000000-0000-0000-0000-000000000001", - "state": "Inactive", - "labels": [ - "some", - "labels" - ] - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json deleted file mode 100644 index 16b35d1cf87..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/CreateSampleClassification.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "operationId": "CreateSampleClassification", - "title": "Create classification schema instance for specific sample resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "client-operation-id", - "sampleId": "00000000-0000-0000-0000-000000000001", - "schemaName": "unique_name", - "classificationObject": "{\n \"record_country\": \"Israel\",\n \"record_city\": \"Tel-Aviv\",\n \"record_date\": \"2020-07-05T14:14:24.2695988+03:00\"\n}" - }, - "responses": { - "200": { - "body": { - "schemaName": "unique_name", - "classificationObject": "{\n \"record_country\": \"Israel\",\n \"record_city\": \"Tel-Aviv\",\n \"record_date\": \"2020-07-05T14:14:24.2695988+03:00\"\n}", - "eTag": "some_SHA256_hash" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json deleted file mode 100644 index 1cfeb5935c8..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Create.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "operationId": "DataStreamClassificationOperations_Create", - "title": "Assigns the classification to the data-stream.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123", - "body": { - "schemaName": "zd", - "classificationObject": "iqdtdovlqjqwemyxvl" - } - }, - "responses": { - "200": { - "body": { - "schemaName": "some-schema", - "classificationObject": "{'some': 'json'}", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json deleted file mode 100644 index 4d20364017a..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Delete.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "operationId": "DataStreamClassificationOperations_Delete", - "title": "Unassign the classification from the data-stream.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "schemaName": "xifyvslnwbimtlsoapwjsmtnnvtczkdnivhuaszbwvazvycpdpxtijfhifvkxvewpanrakjgdizkzprqoxhnwpaweislowuwlgieklyzjvgbmojpoycleeoqmyzyoehusfrznywshreimdqsybjpgjsptojrfckttartckelypetcvnccpafpzf", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - }, - "204": {}, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json deleted file mode 100644 index 30414ea9d1b..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_Get.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "operationId": "DataStreamClassificationOperations_Get", - "title": "Get classification by schema name.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "schemaName": "some-schema", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "schemaName": "some-schema", - "classificationObject": "{'some': 'json'}", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json deleted file mode 100644 index 8cdb16afd2d..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamClassificationOperations_GetAll.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "operationId": "DataStreamClassificationOperations_GetAll", - "title": "Lists the classifications assigned to the data-stream.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "schemaName": "some-schema", - "classificationObject": "{'some': 'json'}", - "etag": "string" - } - ], - "nextLink": "https://microsoft.com/a" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json deleted file mode 100644 index 9e9d8b1cb20..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_Generate.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "operationId": "DataStreamFileOperations_Generate", - "title": "Initiates the process of generating SAS signed URIs for accessing the data-stream files.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "operation-id": "00000000-0000-0000-0000-000000000123", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "clientFileName": "foo.dat", - "fileUri": "https://some-workspace/manifest.json", - "externalTimeStamp": "2022-10-26T06:20:36.367Z", - "size": 27 - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json deleted file mode 100644 index 08b6f90e65a..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamFileOperations_GetAll.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "operationId": "DataStreamFileOperations_GetAll", - "title": "Returns SAS signed URIs for reading special files from Azure Storage.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "foo.dat", - "fileUri": "https://some-storage-account/path-to/foo.dat", - "externalTimeStamp": "2022-10-26T06:20:36.367Z", - "size": 27 - } - ], - "nextLink": "https://microsoft.com/a" - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json deleted file mode 100644 index 7e280977072..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamLogsContainerOperations_GetWritableUri.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "operationId": "DataStreamLogsContainerOperations_GetWritableUri", - "title": "Returns SAS signed URI of the data-stream logs folder that allow uploading log files to Azure Storage.\nThe SAS token expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "logFolderUri": "https://some-storage-account/some-path/logs" - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json deleted file mode 100644 index a7eeaa61170..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_ClearContent.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "operationId": "DataStreamOperations_ClearContent", - "title": "Clear the data-stream content.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "some source id", - "channels": [ - "some channel" - ] - } - ] - }, - "status": "Cleared", - "type": "System", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000123", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json deleted file mode 100644 index 6bc86ea04d1..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Complete.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "operationId": "DataStreamOperations_Complete", - "title": "Marks a data stream as completed", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", - "channels": [ - "audio" - ] - } - ] - }, - "status": "Completed", - "type": "Raw", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json deleted file mode 100644 index b3d9cb65efa..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Create.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "operationId": "DataStreamOperations_Create", - "title": "Creates new data-stream resource.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123", - "body": { - "lineage": { - "producerMetadata": { - "key3673": "ubarvd" - }, - "inputs": [ - { - "sourceDataStreamId": "dyskkgbidtjjpvldsddght", - "channels": [ - "ncjmpikffluh" - ] - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "some source id", - "channels": [ - "some channel" - ] - } - ] - }, - "status": "Created", - "type": "System", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json deleted file mode 100644 index 08595e634ad..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Fail.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "operationId": "DataStreamOperations_Fail", - "title": "Marks a data stream as failed", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", - "channels": [ - "audio" - ] - } - ] - }, - "status": "Failed", - "type": "Raw", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [], - "innererror": { - "code": "kc" - } - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json deleted file mode 100644 index ba8af32a128..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByLineage.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "operationId": "DataStreamOperations_FindByLineage", - "title": "Lists the data-streams by lineage.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "body": { - "lineage": { - "producerMetadata": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - }, - "inputs": [ - { - "sourceDataStreamId": "string", - "channels": [ - "string" - ] - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "dataStreamId": "00000000-0000-0000-0000-000000000008", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", - "channels": [ - "video" - ] - } - ] - }, - "status": "Created", - "type": "Derived", - "etag": "string" - } - ], - "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json deleted file mode 100644 index 7f00a1f3248..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_FindByTags.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "operationId": "DataStreamOperations_FindByTags", - "title": "Lists the data-streams by tags.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "body": { - "tags": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - } - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "dataStreamId": "00000000-0000-0000-0000-000000000008", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", - "channels": [ - "video" - ] - } - ] - }, - "status": "Created", - "type": "Derived", - "etag": "string" - } - ], - "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json deleted file mode 100644 index 96ebd0d3b6b..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_Get.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "operationId": "DataStreamOperations_Get", - "title": "Get data-stream by identifier.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", - "channels": [ - "audio" - ] - } - ] - }, - "status": "Created", - "type": "System", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json deleted file mode 100644 index fe4a33d37c4..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetAll.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "operationId": "DataStreamOperations_GetAll", - "title": "Lists the existing data-streams.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000004", - "channels": [ - "audio" - ] - } - ] - }, - "status": "Created", - "type": "System", - "etag": "string" - }, - { - "dataStreamId": "00000000-0000-0000-0000-000000000006", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", - "channels": [ - "audio" - ] - } - ] - }, - "status": "Created", - "type": "System", - "etag": "string" - } - ], - "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json deleted file mode 100644 index fbd71013448..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_GetLineageGraphsByLineage.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "operationId": "DataStreamOperations_GetLineageGraphsByLineage", - "title": "Lists the data-streams by lineage graph.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "body": { - "processingObjects": [ - { - "metadata": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - }, - "id": "string" - } - ], - "edges": [ - { - "sourceId": "string", - "targetId": "string" - } - ] - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "dataStreamsGraphs": [ - { - "dataStreamByProcessingObjectId": { - "key7260": { - "dataStreamId": "00000000-0000-0000-0000-000000000008", - "resourceEndpoint": "https://some-workspace/some-resource", - "lineage": { - "producerMetadata": { - "some-key": "some-value" - }, - "inputs": [ - { - "sourceDataStreamId": "00000000-0000-0000-0000-000000000005", - "channels": [ - "video" - ] - } - ] - }, - "status": "Created", - "type": "Derived", - "etag": "string" - } - } - } - ] - } - ], - "nextLink": "https://some-workspace/measurements/00000000-0000-0000-0000-000000000003/dataStreams?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json deleted file mode 100644 index 71039a8ccf5..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamOperations_StageFiles.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "DataStreamOperations_StageFiles", - "title": "Shards files to be uploaded to the data-stream and returns SAS-signed upload URIs for each of them.\nThis URI expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "body": { - "files": [ - { - "clientFileName": "ygavrlnfhupasaus", - "recordingTimestampUtc": "2022-10-26T08:22:08.349Z" - } - ] - } - }, - "responses": { - "200": { - "body": { - "files": [ - { - "clientFileName": "some-file.dat", - "fileUri": "https://storage-account/path/some-file.dat" - } - ] - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json deleted file mode 100644 index 1b5a34214a8..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_CreateOrReplace.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "operationId": "DataStreamStorageOperations_CreateOrReplace", - "title": "Create or replace storage information of the data-stream.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "body": { - "type": "shardedStorage", - "rollingInformation": { - "strategy": "Time", - "unit": "Seconds", - "value": 0 - } - } - }, - "responses": { - "200": { - "body": { - "id": "current", - "type": "shardedStorage", - "rollingInformation": { - "strategy": "Time", - "unit": "Seconds", - "value": 0 - }, - "manifestUri": "https://storage-account/path-to-manifest/manifest.json", - "dataFolderUri": "https://storage-account/path-to-data-folder", - "shards": [ - { - "shardFolderUri": "https://storage-account/path-to-shard", - "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" - } - ], - "etag": "string" - } - }, - "201": { - "body": { - "id": "current", - "type": "shardedStorage", - "rollingInformation": { - "strategy": "Time", - "unit": "Seconds", - "value": 0 - }, - "manifestUri": "https://storage-account/path-to-manifest/manifest.json", - "dataFolderUri": "https://storage-account/path-to-data-folder", - "shards": [ - { - "shardFolderUri": "https://storage-account/path-to-shard", - "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" - } - ], - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json deleted file mode 100644 index 3aaa0c8b21c..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_Get.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "operationId": "DataStreamStorageOperations_Get", - "title": "Returns the data-stream storage resource with SAS signed URIs that allow reading from Azure Storage.\nThe SAS token expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "type": "shardedStorage", - "rollingInformation": { - "strategy": "Time", - "unit": "Seconds", - "value": 0 - }, - "manifestUri": "https://storage-account/path-to-manifest/manifest.json", - "dataFolderUri": "https://storage-account/path-to-data-folder", - "shards": [ - { - "shardFolderUri": "https://storage-account/path-to-shard", - "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" - } - ], - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json deleted file mode 100644 index 2a12bd341ee..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamStorageOperations_GetWithWritableUris.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "operationId": "DataStreamStorageOperations_GetWithWritableUris", - "title": "Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage.\nThe SAS token expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "type": "shardedStorage", - "rollingInformation": { - "strategy": "Time", - "unit": "Seconds", - "value": 0 - }, - "manifestUri": "https://storage-account/path-to-manifest/manifest.json", - "dataFolderUri": "https://storage-account/path-to-data-folder", - "shards": [ - { - "shardFolderUri": "https://storage-account/path-to-shard", - "manifestFileUri": "https://storage-account/path-to-shard/manifest.json" - } - ], - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json deleted file mode 100644 index 6ae2841f811..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_CreateOrReplace.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "DataStreamTagsOperations_CreateOrReplace", - "title": "Create or replace all tags at once.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "api-version": "2023-00-00-preview", - "body": { - "tags": [ - { - "key": "foo", - "value": "foo" - } - ] - } - }, - "responses": { - "200": { - "body": { - "tags": [ - { - "key": "foo", - "value": "foo" - } - ] - } - }, - "201": { - "body": { - "tags": [ - { - "key": "foo", - "value": "foo" - } - ] - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json deleted file mode 100644 index 93c862bf3c3..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DataStreamTagsOperations_Get.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "operationId": "DataStreamTagsOperations_Get", - "title": "Returns set of the data-stream tags.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "dataStreamId": "00000000-0000-0000-0000-000000000005", - "id": "current", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "id": "current", - "tags": [ - { - "key": "bar", - "value": "bar" - } - ] - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json deleted file mode 100644 index b96153623f6..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSample.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "DeleteSample", - "title": "Delete the Sample resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json deleted file mode 100644 index 6a35c473862..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DeleteSampleClassification.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "DeleteSampleClassification", - "title": "Delete the Classification assignment from specific sample resource using long-running operation (LRO).", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "00000000-0000-0000-0000-000000000001", - "schemaName": "unique_name" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json deleted file mode 100644 index 65d7b2450d2..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Cancel.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "operationId": "DiscoveryOperations_Cancel", - "title": "Initiates the process of cancelling the discovery.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string", - "manifestUri": "https://some-workspace/manifest.json", - "status": "Cancelled", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json deleted file mode 100644 index abf0a511663..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Complete.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "operationId": "DiscoveryOperations_Complete", - "title": "Initiates the process of completing the discovery and creating the file grouping manifest files.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string", - "manifestUri": "https://some-workspace/manifest.json", - "status": "Completed", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json deleted file mode 100644 index 483c8218df1..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_CreateOrReplace.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "DiscoveryOperations_CreateOrReplace", - "title": "Creates a new ingestion discovery instance.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string" - }, - "responses": { - "200": { - "body": { - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string", - "manifestUri": "https://some-workspace/manifest.json", - "status": "Created", - "etag": "string" - } - }, - "201": { - "body": { - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string", - "manifestUri": "https://some-workspace/manifest.json", - "status": "Created", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json deleted file mode 100644 index 406dba0676a..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryOperations_Get.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "operationId": "DiscoveryOperations_Get", - "title": "Returns discovery by ID.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "body": { - "discoveryId": "00000000-0000-0000-0000-000000000001", - "externalPackageId": "string", - "manifestUri": "https://some-workspace/manifest.json", - "status": "Created", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json deleted file mode 100644 index e67203a8323..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoveryResultUploadOperations_List.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "operationId": "DiscoveryResultUploadOperations_List", - "title": "List upload detail for the discovery resource.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "operation-id": "string" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "uploadId": "00000000-0000-0000-0000-000000000002", - "manifestUri": "https://some-storage-account/path/manifest.json", - "resourceEndpoint": "https://some-workspace/some-resource" - }, - { - "uploadId": "00000000-0000-0000-0000-000000000003", - "manifestUri": "https://some-storage-account/path/manifest.json", - "resourceEndpoint": "https://some-workspace/some-resource" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json deleted file mode 100644 index 673241a91f9..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_Generate.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "operationId": "DiscoverySpecialFileOperations_Generate", - "title": "Initiates the process of generating SAS signed URIs for uploading special files for the discovery.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "body": { - "clientFileName": "file-1.ext", - "fileUri": "https://some-storage-account/path/special-file-1.ext" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json deleted file mode 100644 index 84afc702e3a..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_List.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "operationId": "DiscoverySpecialFileOperations_List", - "title": "List special files details for the discovery resource.\nReturns SAS signed URI that allows reading special files from Azure Storage.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "operation-id": "string" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://some-storage-account/path/special-file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://some-storage-account/path/special-file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json deleted file mode 100644 index 4271884a42c..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/DiscoverySpecialFileOperations_ListWritableUris.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "operationId": "DiscoverySpecialFileOperations_ListWritableUris", - "title": "List special files details for the discovery resource.\nReturns SAS signed URI that allows uploading special files to Azure Storage.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "operation-id": "string" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://some-storage-account/path/special-file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://some-storage-account/path/special-file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json deleted file mode 100644 index 45f104cf45d..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleById.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "GetSampleById", - "title": "Get specific Sample resource.", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "body": { - "id": "00000000-0000-0000-0000-000000000001", - "state": "Inactive", - "labels": [ - "some", - "labels" - ] - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json deleted file mode 100644 index 5212edeec03..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/GetSampleClassification.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "GetSampleClassification", - "title": "Get Classification by schema name for specific Sample resource.", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "00000000-0000-0000-0000-000000000001", - "schemaName": "sample_classification_schema_1" - }, - "responses": { - "200": { - "body": { - "schemaName": "sample_classification_schema_1", - "classificationObject": "{\"description\": \"Classification schema definition (JSON schema as string).\"}", - "eTag": "some_SHA256_hash" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json deleted file mode 100644 index fd890ee2a21..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSampleClassifications.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "operationId": "ListSampleClassifications", - "title": "List classification instances for specific sample resource. Supports paging.", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "00000000-0000-0000-0000-000000000001", - "maxpagesize": 100 - }, - "responses": { - "200": { - "body": { - "value": [ - { - "schemaName": "sample_classification_schema_1", - "classificationObject": "{\"key_1\": \"value_1\"}", - "eTag": "some_SHA256_hash" - }, - { - "schemaName": "sample_classification_schema_2", - "classificationObject": "{\"key_2\": \"value_2\"}", - "eTag": "some_SHA256_hash" - }, - { - "schemaName": "sample_classification_schema_3", - "classificationObject": "{\"key_3\": \"value_3\"}", - "eTag": "some_SHA256_hash" - } - ], - "nextLink": "link" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json deleted file mode 100644 index a394684c616..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/ListSamples.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "operationId": "ListSamples", - "title": "List Sample resources. Supports paging.", - "parameters": { - "api-version": "2023-00-00-preview", - "maxpagesize": 100 - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "1", - "state": "Inactive", - "labels": [ - "some", - "labels" - ] - }, - { - "id": "2", - "state": "Activating", - "labels": [ - "some", - "other", - "labels" - ] - }, - { - "id": "3", - "state": "Active" - } - ], - "nextLink": "link" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json deleted file mode 100644 index 9f0cf3f4d8f..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperationStatus.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "operationId": "LongRunningOperationStatus", - "title": "Get status of the long running operation. (LRO)", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "headers": { - "Retry-After": 5 - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000001", - "status": "Failed", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json deleted file mode 100644 index 9cba31243b6..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/LongRunningOperations_GetStatus.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "operationId": "LongRunningOperations_GetStatus", - "title": "Get status of the long running operation. (LRO)", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "headers": { - "Retry-After": 5 - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000001", - "status": "Failed", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "resultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-the-resource/resource-id?api-version=2023-00-00-preview", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json deleted file mode 100644 index 7f9a20b9053..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Create.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "operationId": "MeasurementClassificationOperations_Create", - "title": "Assigns classification to the measurement.", - "parameters": { - "api-version": "2023-00-00-preview", - "operationId": "client-operation-id", - "measurementId": "00000000-0000-0000-0000-000000000003", - "schemaName": "unique_schema_name", - "classificationObject": "{\"description\": \"Classification instance (JSON schema as string).\"}" - }, - "responses": { - "200": { - "body": { - "schemaName": "unique_schema_name", - "classificationObject": "{\"description\": \"Classification instance (JSON schema as string).\"}", - "etag": "string" - } - }, - "202": { - "headers": { - "Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id/result?api-version=2023-00-00-preview", - "Operation-Location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/client-operation-id?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json deleted file mode 100644 index eeef294bf56..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Delete.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "operationId": "MeasurementClassificationOperations_Delete", - "title": "Unassign the classification from the measurement.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003", - "schemaName": "unique_schema_name" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json deleted file mode 100644 index 1c268b791b1..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_Get.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "operationId": "MeasurementClassificationOperations_Get", - "title": "Get measurement classification by schema name.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "schemaName": "unique_schema_name", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "schemaName": "string", - "classificationObject": "string", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json deleted file mode 100644 index 0996ff3b5dc..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementClassificationOperations_GetAll.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "operationId": "MeasurementClassificationOperations_GetAll", - "title": "List measurement classifications.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "schemaName": "string", - "classificationObject": "string", - "etag": "string" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json deleted file mode 100644 index 41d525f0186..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Complete.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "operationId": "MeasurementMetadataFileInfoOperations_Complete", - "title": "Initiates a process that replaces the measurement's metadata file.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003", - "body": { - "pendingFileEtag": "string" - } - }, - "responses": { - "200": { - "body": { - "metadataFileName": "metadata.json", - "metadataFileUri": "https://some-storage-account/path/metadata.json" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json deleted file mode 100644 index b358f189255..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_Get.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "operationId": "MeasurementMetadataFileInfoOperations_Get", - "title": "Returns SAS signed URI to an existing metadata file with `read` permissions\nand the eTag of that file in response header.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003", - "intent": "write" - }, - "responses": { - "200": { - "body": { - "metadataFileName": "metadata.json", - "metadataFileUri": "https://some-storage-account/path/metadata.json" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json deleted file mode 100644 index fc2bb7bf639..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataFileInfoOperations_GetWritableUri.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "operationId": "MeasurementMetadataFileInfoOperations_GetWritableUri", - "title": "Returns SAS signed URI that allows uploading temporary measurement metadata file to Azure Storage.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003", - "intent": "write" - }, - "responses": { - "200": { - "body": { - "metadataFileName": "metadata.json", - "metadataFileUri": "https://some-storage-account/path/metadata.json" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json deleted file mode 100644 index 7255f7667f4..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataOperations_Get.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "operationId": "MeasurementMetadataOperations_Get", - "title": "Get measurement metadata.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003" - }, - "responses": { - "200": { - "body": { - "metadata": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json deleted file mode 100644 index 859fb150e17..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementMetadataSchemaFileInfoOperations_Get.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "MeasurementMetadataSchemaFileInfoOperations_Get", - "title": "Returns a SAS-signed URI for downloading a metadata schema file for the measurement.\nThis URI expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "schemaFileName": "schema.json", - "schemaFileUri": "https://somewhere/schema.json" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json deleted file mode 100644 index 43b5719f9db..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Delete.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "operationId": "MeasurementOperations_Delete", - "title": "Deletes the measurement.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json deleted file mode 100644 index 40bd4e5a70c..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_FindByIds.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "operationId": "MeasurementOperations_FindByIds", - "title": "Lists the measurements in a workspace that are in the given measurement IDs list.", - "parameters": { - "api-version": "2023-00-00-preview", - "body": { - "measurementIds": [ - "00000000-0000-0000-0000-000000000003" - ] - } - }, - "responses": { - "200": { - "body": { - "value": [ - { - "measurementId": "00000000-0000-0000-0000-000000000003", - "location": "string", - "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", - "resourceEndpoint": "https://some-workspace/some-resource", - "externalPackageId": "string", - "uploadId": "00000000-0000-0000-0000-000000000002", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "recordTimestampUtc": "2022-10-26T06:20:36.367Z", - "etag": "string" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json deleted file mode 100644 index c8b5a10d997..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_Get.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "operationId": "MeasurementOperations_Get", - "title": "Get measurement by ID.", - "parameters": { - "api-version": "2023-00-00-preview", - "measurementId": "00000000-0000-0000-0000-000000000003" - }, - "responses": { - "200": { - "body": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "location": "string", - "ingestTimestampUtc": "2022-10-26T06:26:04.277Z", - "resourceEndpoint": "https://some-workspace/some-resource", - "externalPackageId": "string", - "uploadId": "00000000-0000-0000-0000-000000000002", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "recordTimestampUtc": "2022-10-26T06:26:04.277Z", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json deleted file mode 100644 index 7a062b87ac8..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_GetAll.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "operationId": "MeasurementOperations_GetAll", - "title": "Lists the measurements in a workspace.", - "parameters": { - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "measurementId": "00000000-0000-0000-0000-000000000003", - "location": "string", - "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", - "resourceEndpoint": "https://some-workspace/some-resource", - "externalPackageId": "string", - "uploadId": "00000000-0000-0000-0000-000000000002", - "discoveryId": "string", - "recordTimestampUtc": "2022-10-26T06:20:36.367Z", - "etag": "string" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json deleted file mode 100644 index 2b8355f9622..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileDownloadInformation.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "MeasurementOperations_ProvideMetadataFileDownloadInformation", - "title": "Returns a SAS-signed URI for downloading a metadata file for the measurement.\nThis URI expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "resourceEndpoint": "https://some-workspace/some-resource", - "fileDownloadUri": "https://microsoft.com/a" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json deleted file mode 100644 index 59ab57eee8e..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_ProvideMetadataFileUploadInformation.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "operationId": "MeasurementOperations_ProvideMetadataFileUploadInformation", - "title": "Returns a SAS-signed URI for uploading a metadata file for the measurement.\nThis URI expires in 24 hours.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "resourceEndpoint": "https://some-workspace/some-resource", - "fileUri": "https://microsoft.com/aspzhgmy" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json deleted file mode 100644 index 342eb2aae03..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementOperations_QueryMeasurementsWithMetadata.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "operationId": "MeasurementOperations_QueryMeasurementsWithMetadata", - "title": "Lists the measurements in a workspace with extended metadata.", - "parameters": { - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "measurementId": "00000000-0000-0000-0000-000000000003", - "location": "string", - "ingestTimestampUtc": "2022-10-26T06:20:36.367Z", - "resourceEndpoint": "https://some-workspace/some-resource", - "externalPackageId": "string", - "uploadId": "00000000-0000-0000-0000-000000000002", - "discoveryId": "string", - "recordTimestampUtc": "2022-10-26T06:20:36.367Z", - "etag": "string", - "metadata": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - } - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json deleted file mode 100644 index 9c7958a9071..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementProcessingResultsOperations_Get.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "operationId": "MeasurementProcessingResultsOperations_Get", - "title": "Returns the measurement processing result.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "validationPassed": true, - "results": [ - { - "ruleCategory": "string", - "ruleName": "string", - "details": { - "additionalProp1": "string", - "additionalProp2": "string", - "additionalProp3": "string" - }, - "validationPassed": true, - "validationError": "string" - } - ] - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json deleted file mode 100644 index c04abe0bac2..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Act.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "operationId": "MeasurementStateMachineOperations_Act", - "title": "Initiates process of applying an action on the measurement.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "id": "1", - "actionName": "Unlock" - }, - "responses": { - "200": { - "body": { - "id": "string", - "type": "Lock", - "availableActionNames": [ - "Unlock" - ] - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json deleted file mode 100644 index 769071d9a6b..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_Get.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "MeasurementStateMachineOperations_Get", - "title": "Returns the the state machine instance for the measurement.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview", - "id": "1" - }, - "responses": { - "200": { - "body": { - "id": "string", - "type": "string", - "availableActionNames": [ - "string" - ] - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json deleted file mode 100644 index d1e33c04f1e..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/MeasurementStateMachineOperations_GetAll.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "operationId": "MeasurementStateMachineOperations_GetAll", - "title": "List state machines instance for the measurement.", - "parameters": { - "measurementId": "00000000-0000-0000-0000-000000000003", - "api-version": "2023-00-00-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "string", - "type": "Lock", - "availableActionNames": [ - "Unlock" - ] - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json deleted file mode 100644 index c7ce71ca634..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/RunSampleWorkflow.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "RunSampleWorkflow", - "title": "Executes an asynchronous action on the Sample. Uses long-running operation (LRO) pattern.", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "sample123" - }, - "responses": { - "204": {}, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json deleted file mode 100644 index 4c1f429bb7a..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/SetLabelsWithPatch.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "operationId": "SetLabelsWithPatch", - "title": "Set labels for a specific sample resource.", - "parameters": { - "api-version": "2023-00-00-preview", - "sampleId": "sample123", - "labels": [ - "list", - "of", - "new", - "labels", - "after", - "patch" - ] - }, - "responses": { - "200": { - "body": { - "id": "00000000-0000-0000-0000-000000000001", - "state": "Active", - "labels": [ - "list", - "of", - "new", - "labels", - "after", - "patch" - ] - } - }, - "default": { - "body": { - "error": { - "code": "Error code", - "message": "Error message" - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json deleted file mode 100644 index c4a80475608..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_Generate.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "operationId": "UploadDataFileOperations_Generate", - "title": "Initiates the process of sharding the files.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json deleted file mode 100644 index 4baec447888..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_GetAll.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "operationId": "UploadDataFileOperations_GetAll", - "title": "Returns SAS signed URIs for reading data files from Azure Storage.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://somewhere/file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json deleted file mode 100644 index 316a1cf4baf..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadDataFileOperations_ListWritableUris.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "operationId": "UploadDataFileOperations_ListWritableUris", - "title": "List special files details for the upload resource.\nReturns SAS signed URI that allows uploading data files to Azure Storage.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://somewhere/file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json deleted file mode 100644 index cb5da0c58df..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Cancel.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "operationId": "UploadOperations_Cancel", - "title": "Initiates the process of cancelling the upload.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "manifestUri": "https://some-storage-account/path/manifest.json", - "resourceEndpoint": "https://some-workspace/some-resource", - "status": "Cancelled", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "00000000-0000-0000-0000-000000000123", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json deleted file mode 100644 index 972b0416ed5..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Complete.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "operationId": "UploadOperations_Complete", - "title": "Initiates the process of completing the upload and creating the measurements.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002", - "operation-id": "00000000-0000-0000-0000-000000000123" - }, - "responses": { - "200": { - "body": { - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "manifestUri": "https://some-storage-account/path/manifest.json", - "resourceEndpoint": "https://some-workspace/some-resource", - "status": "Completed", - "etag": "string" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json deleted file mode 100644 index 82b186927e3..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_CreateOrReplace.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "operationId": "UploadOperations_CreateOrReplace", - "title": "Creates a new ingestion upload instance.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002", - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001" - }, - "responses": { - "200": { - "body": { - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "resourceEndpoint": "https://some-workspace/some-resource", - "manifestUri": "https://somewhere/file.ext", - "status": "Created", - "etag": "string" - } - }, - "201": { - "body": { - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "resourceEndpoint": "https://some-workspace/some-resource", - "manifestUri": "https://somewhere/file.ext", - "status": "Created", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json deleted file mode 100644 index de6b0357deb..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadOperations_Get.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "operationId": "UploadOperations_Get", - "title": "Returns upload by ID.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "externalPackageId": "string", - "discoveryId": "00000000-0000-0000-0000-000000000001", - "manifestUri": "https://some-storage-account/path/manifest.json", - "resourceEndpoint": "https://some-workspace/some-resource", - "status": "Created", - "etag": "string" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json deleted file mode 100644 index 9771401c045..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadResultMeasurementOperations_GetAll.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "operationId": "UploadResultMeasurementOperations_GetAll", - "title": "Returns the final result of the discovery process.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "measurementId": "measurement-1" - }, - { - "measurementId": "measurement-2" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json deleted file mode 100644 index 1238f8333f6..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_Generate.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "operationId": "UploadSpecialFileOperations_Generate", - "title": "Initiates the process of generating SAS signed URIs for uploading special files for the upload.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - } - }, - "202": { - "headers": { - "location": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "operation-location": "https://workspace-name-hash.workspaces.region.adp.azure.com/operations/00000000-0000-0000-0000-000000000123?api-version=2023-00-00-preview" - }, - "body": { - "operationId": "string", - "status": "Created", - "finalResultLocation": "https://workspace-name-hash.workspaces.region.adp.azure.com/path-to-resource/00000000-0000-0000-0000-000000000321?api-version=2023-00-00-preview", - "etag": "sha256", - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json deleted file mode 100644 index 65c99bdef92..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_GetAll.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "operationId": "UploadSpecialFileOperations_GetAll", - "title": "Returns SAS signed URIs for reading special files from Azure Storage.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://somewhere/file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json b/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json deleted file mode 100644 index d217a653b12..00000000000 --- a/packages/cadl-python/adp/Core/examples/2023-00-00-preview/UploadSpecialFileOperations_ListWritableUris.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "operationId": "UploadSpecialFileOperations_ListWritableUris", - "title": "List special files details for the upload resource.\nReturns SAS signed URI that allows uploading special files to Azure Storage.\nThis URI expires in 24 hours.", - "parameters": { - "api-version": "2023-00-00-preview", - "uploadId": "00000000-0000-0000-0000-000000000002" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "clientFileName": "file-1.ext", - "fileUri": "https://somewhere/file-1.ext" - }, - { - "clientFileName": "file-2.ext", - "fileUri": "https://somewhere/file-2.ext" - } - ], - "nextLink": "https://workspace/path-to-collection?continuationToken=123" - } - }, - "default": { - "body": { - "error": { - "code": "string", - "message": "string", - "target": "string", - "details": [] - } - } - } - } -} diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl deleted file mode 100644 index c99fbf27748..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/discovery/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl deleted file mode 100644 index 56e2aae27f4..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/discovery/models.cadl +++ /dev/null @@ -1,138 +0,0 @@ -using Cadl.Rest; -using Azure.Core; - -namespace Adp.Core.Ingestion.Discovery; - -@doc("Internal - the model for internal use") -model DiscoveryIdentifier { - @doc("The discovery identifier.") - @key - @minLength(1) - @maxLength(36) - discoveryId: string; -} - -@doc("Discovery resource creation parameters.") -@withVisibility("create") -@withoutOmittedProperties("discoveryId") -model DiscoveryCreationParameters { - ...Discovery; -} - -@doc("A discovery resource.") -@resource("discoveries") -model Discovery { - ...DiscoveryIdentifier; - - @doc("ID of the external package (for example, the disk which contained data) which was used upon the creation of upload") - @visibility("read", "create") - externalPackageId?: string; - - @doc(""" - SAS signed URI for accessing the discovery manifest file on Azure Storage. - This URI expires in 24 hours. - """) - @visibility("read", "update") - manifestUri?: Cadl.url; - - @doc("The discovery status.") - @visibility("read", "update") - status?: DiscoveryStatus; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("A discovery special file resource.") -@resource("specialFilesUploadInfo") -@parentResource(Discovery) -model DiscoverySpecialFile { - @doc("Client file name.") - @key - clientFileName: string; - - @doc("File name on storage.") - fileUri: string; -} - -@doc("A discovery upload resource.") -@resource("uploads") -@parentResource(Discovery) -model DiscoveryUpload { - @doc("Upload identifier.") - @key - @minLength(1) - @maxLength(36) - uploadId: string; - - @doc(""" - SAS signed URI for downloading the manifest file from Azure Storage. - The manifest file contains list of all files in the group. - This URI expires in 24 hours. - """) - manifestUri: url; - ...CommonResourceEndpoint; -} - -@doc("Describes the list of special files to be uploaded") -model DiscoverySpecialFilesResponse { - ...DiscoveryIdentifier; - - @doc("List of the special files") - files: FileUploadInformation[]; -} - -@doc("Known discovery error codes.") -enum DiscoveryOperationErrorCode { - @doc("The operation has succeeded") - Succeeded: "Succeeded", - - @doc("Discovery manifest file doesn't exist") - DiscoveryManifestNotFound: "DiscoveryManifestNotFound", - - @doc("Invalid discovery manifest format") - InvalidDiscoveryManifestFormat: "InvalidDiscoveryManifestFormat", - - @doc("The special file doesn't exist") - SpecialFileNotFound: "SpecialFileNotFound", - - @doc("The special file has an invalid format") - InvalidSpecialFileFormat: "InvalidSpecialFileFormat", - - @doc("Data pool doesn't exist") - DataPoolDoesNotExist: "DataPoolDoesNotExist", - - @doc("Workspace doesn't exist") - WorkspaceDoesNotExist: "WorkspaceDoesNotExist", - - @doc("Invalid disk structure") - InvalidDiskFolderStructure: "InvalidDiskFolderStructure", - - @doc("The operation has failed with an unexpected error") - Unknown: "Unknown", -} - -@doc("The status of the discovery") -enum DiscoveryStatus { - @doc("The discovery process has been initiated") - Created: "Created", - - @doc("The system is analyzing the discovery manifest file uploaded by the client and generating the upload information for uploading special files.") - GeneratingSpecialFilesUploadInfo: "GeneratingSpecialFilesUploadInfo", - - @doc("The system has analyzed the discovery manifest file and generated the upload information for uploading special files.") - GeneratedSpecialFilesUploadInfo: "GeneratedSpecialFilesUploadInfo", - - @doc("The system is processing the special files uploaded by the client") - Completing: "Completing", - - @doc("The system has finished the analysis of special files") - Completed: "Completed", - - @doc("The system is cancelling the discovery process") - Aborting: "Aborting", - - @doc("The discovery process has been aborted") - Aborted: "Aborted", - - @doc("The discovery process has been failed") - Failed: "Failed", -} diff --git a/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl b/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl deleted file mode 100644 index 06d51df14f1..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/discovery/operations.cadl +++ /dev/null @@ -1,67 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.Ingestion.Discovery; - -@tag("Discovery") -interface DiscoveryOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Creates a new ingestion discovery instance.") - createOrReplace is CustomResourceCreateOrReplace< - Discovery, - CustomBodyWrapper - >; - - @doc("Get discovery by ID.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of completing the discovery and creating the upload file grouping manifest files.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - complete is CustomLongRunningResourceAction; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of cancelling the discovery.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - cancel is CustomLongRunningResourceAction; -} - -@tag("Discovery") -interface DiscoverySpecialFileOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of generating SAS signed URIs for uploading special files for the discovery.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - generate is CustomLongRunningResourceCollectionAction< - DiscoverySpecialFile, - {}, - DiscoverySpecialFile - >; - - @doc(""" - List special files details for the discovery resource. - Returns SAS signed URI that allows uploading special files to Azure Storage. - This URI expires in 24 hours. - """) - listWritableUris is ResourceCollectionAction< - DiscoverySpecialFile, - {}, - Page - >; -} - -@tag("Discovery") -interface DiscoveryResultUploadOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("List upload detail for the discovery resource.") - list is CustomResourceList; -} diff --git a/packages/cadl-python/adp/Core/ingestion/main.cadl b/packages/cadl-python/adp/Core/ingestion/main.cadl deleted file mode 100644 index dccb74e6d3d..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./discovery"; -import "./upload"; diff --git a/packages/cadl-python/adp/Core/ingestion/upload/main.cadl b/packages/cadl-python/adp/Core/ingestion/upload/main.cadl deleted file mode 100644 index c99fbf27748..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/upload/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/ingestion/upload/models.cadl b/packages/cadl-python/adp/Core/ingestion/upload/models.cadl deleted file mode 100644 index 2997755d094..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/upload/models.cadl +++ /dev/null @@ -1,198 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; - -namespace Adp.Core.Ingestion.Upload; - -@doc("Internal - the model for internal use") -model UploadIdentifier { - @doc("The upload resource identifier.") - @visibility("update") - @key - @path - @minLength(1) - @maxLength(36) - uploadId: string; -} - -@doc("Upload resource creation parameters") -@withVisibility("create") -@withoutOmittedProperties("uploadId") -model UploadCreationParameters { - ...Upload; -} - -@doc("An upload resource.") -@resource("uploads") -model Upload { - ...UploadIdentifier; - - @doc("ID of the external package (for example, the disk which contained data) which was used upon the creation of upload.") - @visibility("read", "create") - externalPackageId?: string; - - @doc("The discovery identifier.") - @visibility("read", "create") - @minLength(1) - @maxLength(36) - discoveryId?: string; - - @doc(""" - SAS signed URI for uploading or reading the upload manifest file on Azure Storage. - Note, if the upload status is 'Created' then the URI is signed with 'Write' permissions, otherwise with 'Read' permission. - This URI expires in 24 hours. - """) - @visibility("read") - manifestUri?: url; - - @doc("The upload state") - @visibility("read", "update") - status?: UploadStatus; - ...CommonResourceEndpoint; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("Special file resource.") -@resource("specialFilesUploadInfo") -@parentResource(Upload) -model UploadSpecialFile { - ...FileUploadInformation; -} - -@doc("Data file resource.") -@resource("dataFilesUploadInfo") -@parentResource(Upload) -model UploadDataFile { - ...FileUploadInformation; -} - -@doc("A measurement resource created as result of the upload.") -@resource("measurements") -@parentResource(Upload) -model UploadResultMeasurement { - @doc("Measurement identifier.") - @key - measurementId: string; -} - -@doc("Upload resource response.") -model UploadIdentifierAndEndpoint { - @doc("The upload identifier.") - @minLength(1) - @maxLength(36) - uploadId: string; - ...CommonResourceEndpoint; -} - -@doc("A response providing the results of an upload") -model UploadResultsResponse { - ...UploadIdentifierAndEndpoint; - - @doc("The measurement IDs that been created by the upload") - measurementIds: string[]; -} - -@doc("A response describing the list of special files to be uploaded") -model UploadSpecialFilesResponse { - ...UploadIdentifierAndEndpoint; - - @doc("List of the special files") - files: FileUploadInformation[]; -} - -@doc("Provides upload manifest URI on Azure Storage.") -model GetUploadManifestUriResponse { - @doc("The upload identifier.") - @minLength(1) - @maxLength(36) - uploadId: string; - - @doc(""" - SAS signed URI for uploading the manifest file to Azure Storage. - This URI expires in 24 hours. - """) - manifestUri: url; - ...CommonResourceEndpoint; -} - -@doc("Parameters to the upload URIs retrieval request") -model UploadFilesRequest { - @doc("List of client file names for which the upload URIs are requested") - clientFileNames: string[]; -} - -@doc("A response providing the list of upload Uris for the files to be uploaded") -@withOptionalProperties -model UploadFilesResponse { - @doc("The upload identifier.") - @minLength(1) - @maxLength(36) - uploadId: string; - ...CommonResourceEndpoint; - - @doc("List of SAS-signed file upload URIs") - files: FileUploadInformation[]; -} - -@doc("The state of the upload") -enum UploadStatus { - @doc("The upload process has been initiated. The client should upload the upload manifest file using the SAS-signed upload URI provided by the system") - Created: "Created", - - @doc("The system is analyzing the upload manifest file uploaded by the client and generating the upload information for uploading special files.") - GeneratingSpecialFilesUploadInfo: "GeneratingSpecialFilesUploadInfo", - - @doc("The system has analyzed the upload manifest file and generated the upload information for uploading special files.") - GeneratedSpecialFilesUploadInfo: "GeneratedSpecialFilesUploadInfo", - - @doc("The system is sharding the files and generating the upload information for uploading data files.") - GeneratingDataFilesUploadInfo: "GeneratingDataFilesUploadInfo", - - @doc("The system has sharded the files and generated the upload information for uploading data files. The client should upload the measurement files using the SAS-signed upload URIs provided by the system.") - GeneratedDataFilesUploadInfo: "GeneratedDataFilesUploadInfo", - - @doc("The system is completing the upload process (creating measurements etc.)") - Completing: "Completing", - - @doc("The system completed the upload process") - Completed: "Completed", - - @doc("The system is cancelling the upload process") - Aborting: "Aborting", - - @doc("The system cancelled the upload process") - Aborted: "Aborted", - - @doc("The system marked the upload process as failed") - Failed: "Failed", -} - -@doc("Known upload types.") -enum UploadOperationErrorCode { - @doc("The operation has succeeded") - Succeeded: "Succeeded", - - @doc("Upload manifest file doesn't exist") - UploadManifestNotFound: "UploadManifestNotFound", - - @doc("Invalid upload manifest format") - InvalidUploadManifestFormat: "InvalidUploadManifestFormat", - - @doc("Invalid disk structure") - InvalidDiskFolderStructure: "InvalidDiskFolderStructure", - - @doc("One or more special files was of an invalid format") - InvalidSpecialFileFormat: "InvalidSpecialFileFormat", - - @doc("One or more special files assigned the measurement to a different data pool than that of the upload.") - DataPoolMismatch: "DataPoolMismatch", - - @doc("One or more special files doesn't exist") - SpecialFileNotFound: "SpecialFileNotFound", - - @doc("Expected data files are missing from one or more shards") - MissingDataFiles: "MissingDataFiles", - - @doc("The operation has failed with an unexpected error") - Unknown: "Unknown", -} diff --git a/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl b/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl deleted file mode 100644 index 4b66b2088e7..00000000000 --- a/packages/cadl-python/adp/Core/ingestion/upload/operations.cadl +++ /dev/null @@ -1,92 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.Ingestion.Upload; - -@tag("Upload") -interface UploadOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Creates a new ingestion upload instance.") - createOrReplace is CustomResourceCreateOrReplace< - Upload, - CustomBodyWrapper - >; - - @doc("Get discovery by ID.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of completing the upload and creating the measurements.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - complete is CustomLongRunningResourceAction; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of cancelling the upload.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - cancel is CustomLongRunningResourceAction; -} - -@tag("Upload") -interface UploadSpecialFileOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of generating SAS signed URIs for uploading special files for the upload.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - generate is CustomLongRunningResourceCollectionAction< - UploadSpecialFile, - {}, - UploadSpecialFile - >; - - @doc(""" - List special files details for the upload resource. - Returns SAS signed URI that allows uploading special files to Azure Storage. - This URI expires in 24 hours. - """) - listWritableUris is ResourceCollectionAction< - UploadSpecialFile, - {}, - Page - >; -} - -@tag("Upload") -interface UploadDataFileOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of allocating the data files.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - generate is CustomLongRunningResourceCollectionAction< - UploadDataFile, - {}, - UploadDataFile - >; - - @doc(""" - List special files details for the upload resource. - Returns SAS signed URI that allows uploading data files to Azure Storage. - This URI expires in 24 hours. - """) - listWritableUris is ResourceCollectionAction< - UploadDataFile, - {}, - Page - >; -} - -@tag("Upload") -interface UploadResultMeasurementOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("List of the measurement identifiers that have been created by the upload.") - getAll is CustomResourceList; -} diff --git a/packages/cadl-python/adp/Core/main.cadl b/packages/cadl-python/adp/Core/main.cadl deleted file mode 100644 index e3553e9fe92..00000000000 --- a/packages/cadl-python/adp/Core/main.cadl +++ /dev/null @@ -1,17 +0,0 @@ -import "../Adp.Shared/common.cadl"; - -import "./ingestion"; -import "./classification"; -import "./measurement"; - -import "./models.cadl"; -import "./operations.cadl"; - -using Cadl.Http; - -@service({ - title: "Adp", - version: "2023-00-00-preview", -}) -@useAuth(OAuth2Auth<[ImplicitAuthorizationFlow]>) -namespace Adp.Core; diff --git a/packages/cadl-python/adp/Core/measurement/classification/main.cadl b/packages/cadl-python/adp/Core/measurement/classification/main.cadl deleted file mode 100644 index c99fbf27748..00000000000 --- a/packages/cadl-python/adp/Core/measurement/classification/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/classification/models.cadl b/packages/cadl-python/adp/Core/measurement/classification/models.cadl deleted file mode 100644 index fcbcfb27084..00000000000 --- a/packages/cadl-python/adp/Core/measurement/classification/models.cadl +++ /dev/null @@ -1,20 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using OpenAPI; -using Autorest; - -namespace Adp.Core.Measurement.Classification; - -@doc("Measurement classification") -@resource("classifications") -@parentResource(Measurement) -model MeasurementClassification { - ...Adp.Classification; -} - -@doc("{name} resource creation parameters.", MeasurementClassification) -@withVisibility("create") -model MeasurementClassificationCreationParameters { - ...MeasurementClassification; -} diff --git a/packages/cadl-python/adp/Core/measurement/classification/operations.cadl b/packages/cadl-python/adp/Core/measurement/classification/operations.cadl deleted file mode 100644 index 65d8c68616a..00000000000 --- a/packages/cadl-python/adp/Core/measurement/classification/operations.cadl +++ /dev/null @@ -1,35 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.Measurement.Classification; - -@tag("Measurement Classification") -interface MeasurementClassificationOperations { - @doc("Get measurement classification by schema name.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Assigns classification to the measurement.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - create is CustomLongRunningResourceCreateUsingHttpPost< - MeasurementClassification, - CustomBodyWrapper - >; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Unassign the classification from the measurement.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - delete is CustomLongRunningResourceDelete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Lists the classifications assigned to the measurement.") - getAll is CustomResourceList; -} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl deleted file mode 100644 index c99fbf27748..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/classification/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl deleted file mode 100644 index 599b3397365..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/classification/models.cadl +++ /dev/null @@ -1,21 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; - -namespace Adp.Core.DataStream.Classification; - -enum DataStreamClassificationClients { - DataStreamClassificationsClient, -} - -@doc("The data-stream classification.") -@resource("classifications") -@parentResource(DataStream) -model DataStreamClassification { - ...Adp.Classification; -} - -@doc("{name} resource creation parameters.", DataStreamClassification) -@withVisibility("create") -model DataStreamClassificationCreationParameters { - ...DataStreamClassification; -} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl deleted file mode 100644 index 7baa054f020..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/classification/operations.cadl +++ /dev/null @@ -1,35 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.DataStream.Classification; - -@tag("Data Stream Classification") -interface DataStreamClassificationOperations { - @doc("Get classification by schema name.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Assigns the classification to the data-stream.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - create is CustomLongRunningResourceCreateUsingHttpPost< - DataStreamClassification, - CustomBodyWrapper - >; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Unassign the classification from the data-stream.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - delete is CustomLongRunningResourceDelete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Lists the classifications assigned to the data-stream.") - getAll is CustomResourceList; -} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl deleted file mode 100644 index c99fbf27748..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/main.cadl +++ /dev/null @@ -1,3 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl deleted file mode 100644 index 0250c76a987..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/models.cadl +++ /dev/null @@ -1,340 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; - -namespace Adp.Core.DataStream; - -@doc("A data-stream resource") -@resource("dataStreams") -@parentResource(Adp.Core.Measurement.Measurement) -model DataStream { - @doc("The data stream identifier") - @key - dataStreamId: string; - ...CommonResourceEndpoint; - - @doc("The data stream lineage information") - @visibility("create") - lineage: DataStreamLineage; - - @doc("The data stream status") - @visibility("update") - status: DataStreamStatus; - - @doc("The data stream type") - @visibility("update") - type: DataStreamType; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -alias Tags = Record; - -@doc("DataStream resource creation parameters") -@withVisibility("create") -@withoutOmittedProperties("dataStreamId") -model DataStreamCreationParameters { - ...DataStream; -} - -@doc("A wrapper for the list of data streams") -model DataStreamListResponse { - @doc("Collection of the data stream's channels") - dataStreams: DataStream[]; -} - -@doc("Graph of matched data streams by processing objects graph") -model DataStreamsGraph { - @doc("Dictionary of data stream by processing object id") - dataStreamByProcessingObjectId: Record; -} - -@doc("List of graphs of matched data streams by processing objects graph") -model DataStreamsGraphListResponse { - @doc("List of data streams matched graphs") - dataStreamsGraphs: DataStreamsGraph[]; -} - -@doc("Data stream search by type query parameters") -model FindDataStreamByTypeRequestParameters { - @doc("The data-stream type to search for") - type: DataStreamType; -} - -@doc("Data stream search by lineage query parameters") -model FindDataStreamByLineageRequestParameters { - @doc("The data-stream lineage to search for") - lineage: DataStreamLineage; -} - -@doc("Data stream search by tags parameters") -model FindDataStreamByTagsRequestParameters { - @doc("The list of tags to search for") - tags: Record; -} - -@doc("Data stream file upload parameters") -model UploadDerivedDataStreamFilesRequest { - @doc("The information of the files that are to be uploaded") - files: DerivedDataStreamFileInformation[]; -} - -@doc("Data stream file upload request parameters") -model UploadDerivedDataStreamFilesResponse { - @doc("Per-file upload instructions") - files: FileUploadInformation[]; -} - -@doc("Data stream lineage information") -model DataStreamLineage { - @doc("The data stream's metadata") - producerMetadata: Record; - - @doc("The data stream's inputs") - inputs: DataStreamInput[]; -} - -@doc("Data-stream input definition.") -model DataStreamInput { - @doc("The source data-stream identifier") - sourceDataStreamId: string; - - @doc("Collection of the data stream's channels") - channels?: string[]; -} - -@doc("Processing objects graph") -model FindDataStreamByLineageGraphRequestParameters { - @doc("The processing objects") - processingObjects: ProcessingObject[]; - - @doc("The processing objects edges") - edges: ProcessingObjectEdge[]; -} - -@doc("Processing object node information in a processing objects Graph") -model ProcessingObject { - @doc("The processing object metadata") - metadata: Record; - - @doc("A request unique ID to identify processing objects in graph") - id: string; -} - -@doc("Processing objects edge") -model ProcessingObjectEdge { - @doc("The source processing object ID") - sourceId: string; - - @doc("The target processing object ID") - targetId: string; -} - -@doc("Data stream rolling information") -model DataStreamRollingInformation { - @doc("Data stream rolling strategy") - strategy: DataStreamRollingStrategy; - - @doc("Data stream rolling unit") - unit: DataStreamRollingUnit; - - @doc("Data stream rolling value") - @minValue(0) - value: int32; -} - -@doc("Data stream rolling strategy") -enum DataStreamRollingStrategy { - Time: "Time", - Size: "Size", -} - -@doc("Data stream rolling unit") -enum DataStreamRollingUnit { - Seconds: "Seconds", - Minutes: "Minutes", - kB: "kB", - MB: "MB", - GB: "GB", -} - -@doc("The access information to the data stream shard") -model DataStreamShardAccessInformation { - @doc(""" -SAS signed URI for reading the shard folder content from Azure Storage. -This URI expires in 24 hours. -""") - shardFolderUri: url; - - @doc(""" -SAS signed URI for reading the shard manifest file from Azure Storage. -This URI expires in 24 hours. -""") - manifestFileUri: url; -} - -@doc("Data stream state") -enum DataStreamStatus { - Created: "Created", - Completing: "Completing", - Completed: "Completed", - Failed: "Failed", - Failing: "Failing", - Clearing: "Clearing", - Cleared: "Cleared", -} - -@doc("Data stream type") -enum DataStreamType { - System: "System", - Raw: "Raw", - Derived: "Derived", -} - -@doc("Data stream shards list and relevant metadata") -model DataStreamShardsResponse { - @doc("The list of shards associated with the data stream") - shards: DataStreamShardAccessInformation[]; -} - -@doc("Information about a file") -model DerivedDataStreamFileInformation { - @doc("The file name as provided by the client") - clientFileName: string; - - @doc("The file recording UTC timestamp as provided by the client") - recordingTimestampUtc?: zonedDateTime; -} - -enum StorageTypes { - ShardedStorage: "shardedStorage", - Storage: "storage", -} - -@doc("Common data-stream storage model.") -model StorageBase { - @doc("Storage type.") - type: StorageTypes; - - @doc("The data stream rolling information") - @visibility("create") - rollingInformation?: DataStreamRollingInformation; - - @doc(""" - SAS signed URI for downloading the data stream storage manifest file from Azure Storage. - This URI expires in 24 hours. - """) - @visibility("read", "update") - manifestUri: url; - - @doc(""" - SAS signed URI for accessing the data stream data stored on the Azure Storage. - This URI expires in 24 hours. - """) - @visibility("read") - dataFolderUri?: url; - - @doc("The list of shards associated with the data stream") - @visibility("read", "update") - @minItems(1) - shards: DataStreamShardAccessInformation[]; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("A data-stream with non sharded storage resource") -@resource("storage") -@parentResource(DataStream) -model Storage { - @doc(""" - The data stream storage identifier. - Not in use as this is a singleton resource. - TODO: check with CADL team how to define a singleton child resource without key. - """) - @key - id: SingletonIdentifier; - ...StorageBase; -} - -@doc("Storage resource creation parameters") -@withoutOmittedProperties("id") -@withVisibility("create") -model StorageCreationParameters { - ...Storage; -} - -@doc("A data-stream tags.") -@resource("tags") -@parentResource(DataStream) -model TagSet { - @doc(""" - The data stream tag set identifier. - Not in use as this is a singleton resource. Tags could be set or returned as singleton set. - TODO: check with CADL team how to define a singleton child resource without key. - """) - @key - id: SingletonIdentifier; - ...TagSetBase; -} - -@doc("Tag set.") -model TagSetBase { - @doc("Set of data-stream tags.") - @visibility("read", "create") - tags: Tag[]; -} - -@doc("Tag element.") -model Tag { - @doc("Tag identifier") - @key - key: string; - - @doc("Tag value.") - value: string; -} - -@doc("Storage resource creation parameters") -@withoutOmittedProperties("id") -@withVisibility("create") -model TagSetCreationParameters { - ...TagSet; -} - -@doc("Data-stream file list.") -@resource("files") -@parentResource(DataStream) -model DataStreamFile { - @doc("Client file name.") - @key - clientFileName: string; - - @doc(""" - SAS signed URI for downloading the file from Azure Storage. - This URI expires in 24 hours. - """) - fileUri: url; - - @doc("UTC date and time indicating the start of file recording") - externalTimeStamp: zonedDateTime; - - @doc("Size in bytes") - size: int64; -} - -@doc("Data-stream logs folder") -@resource("logs") -@parentResource(DataStream) -model DataStreamLogsContainer { - @doc("Static identifier for singleton resource") - @key - id: SingletonIdentifier; - ...DataStreamLogsContainerBase; -} - -@doc("Data-stream logs folder") -model DataStreamLogsContainerBase { - @doc(""" - SAS signed URI for accessing the logs container on Azure Storage. - This URI expires in 24 hours. - """) - logFolderUri: url; -} diff --git a/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl b/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl deleted file mode 100644 index 72f93f649eb..00000000000 --- a/packages/cadl-python/adp/Core/measurement/data-stream/operations.cadl +++ /dev/null @@ -1,159 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.DataStream; - -@tag("Data Stream") -interface DataStreamOperations { - @doc("Get data-stream by identifier.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Creates new data-stream resource.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - create is CustomLongRunningResourceCreateWithServiceProvidedName< - DataStream, - CustomBodyWrapper - >; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Clear the data-stream content.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - clearContent is CustomLongRunningResourceAction; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc(""" - Lists the existing data-streams. - Supports the following filter expressions: - - filter="type=[System | Raw | Derived]" - """) - getAll is CustomResourceList< - DataStream, - { - parameters: FilterQueryParameter; - } - >; - - @doc(""" - Returns SAS-signed upload URIs for files that need to be uploaded to Azure Storage. - This URI expires in 24 hours. - """) - stageFiles is ResourceAction< - DataStream, - CustomBodyWrapper, - UploadDerivedDataStreamFilesResponse - >; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Marks a data stream as completed") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - complete is CustomLongRunningResourceAction; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Marks a data stream as failed") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - fail is CustomLongRunningResourceAction; - - @doc("Lists the data-streams by tags.") - findByTags is ResourceCollectionAction< - DataStream, - CustomBodyWrapper, - Page - >; - - @doc("Lists the data-streams by lineage.") - findByLineage is ResourceCollectionAction< - DataStream, - CustomBodyWrapper, - Page - >; - - @doc("Lists the data-streams by lineage graph.") - getLineageGraphsByLineage is ResourceCollectionAction< - DataStream, - CustomBodyWrapper, - Page - >; -} - -@tag("Data Stream") -interface DataStreamStorageOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc(""" - Create or replace storage information of the data-stream. - Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage. - The SAS token expires in 24 hours. - """) - @segmentOf(Storage) - createOrReplace is CustomSingletonResourceCreateOrReplace< - Storage, - CustomBodyWrapper - >; - - @doc(""" - Returns the data-stream storage resource with SAS signed URIs that allow uploading to Azure Storage. - The SAS token expires in 24 hours. - """) - getWithWritableUris is ResourceCollectionAction; -} - -#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." -@tag("Data Stream") -interface DataStreamTagsOperations { - @doc("Returns set of the data-stream tags.") - @segmentOf(TagSet) - get is CustomSingletonResourceRead; - - @doc("Create or replace all tags at once.") - @segmentOf(TagSet) - createOrReplace is CustomSingletonResourceCreateOrReplace< - TagSet, - CustomBodyWrapper, - TagSetBase - >; -} - -#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." -@tag("Data Stream") -interface DataStreamFileOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("Returns SAS signed URIs for reading special files from Azure Storage.") - getAll is CustomResourceList; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom LRO response template the LRO actions." - @doc("Initiates the process of generating SAS signed URIs for accessing the data-stream files.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - generate is CustomLongRunningResourceCollectionAction< - DataStreamFile, - {}, - DataStreamFile - >; -} - -#suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." -@tag("Data Stream") -interface DataStreamLogsContainerOperations { - @doc(""" - Returns SAS signed URI of the data-stream logs folder that allow uploading log files to Azure Storage. - The SAS token expires in 24 hours. - """) - getWritableUri is ResourceCollectionAction< - DataStreamLogsContainer, - {}, - DataStreamLogsContainerBase - >; -} diff --git a/packages/cadl-python/adp/Core/measurement/main.cadl b/packages/cadl-python/adp/Core/measurement/main.cadl deleted file mode 100644 index 5614eb96813..00000000000 --- a/packages/cadl-python/adp/Core/measurement/main.cadl +++ /dev/null @@ -1,6 +0,0 @@ -import "../main.cadl"; -import "./models.cadl"; -import "./operations.cadl"; -import "./classification"; -import "./data-stream"; -import "./data-stream/classification"; diff --git a/packages/cadl-python/adp/Core/measurement/models.cadl b/packages/cadl-python/adp/Core/measurement/models.cadl deleted file mode 100644 index 6075ea5245a..00000000000 --- a/packages/cadl-python/adp/Core/measurement/models.cadl +++ /dev/null @@ -1,261 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; - -namespace Adp.Core.Measurement; - -@parentResource(Measurement) -@resource("stateMachines") -@doc("State machine") -model StateMachine { - @doc("The state machine identifier.") - @key - id: string; - - @doc("Type of the state machine") - type: string; - - @doc("Type of the state machine") - availableActionNames: string[]; -} - -@doc("State machine action name.") -model StateMachineAction { - @doc("The state machine action name.") - actionName: string; -} - -@doc("A measurement resource") -@resource("measurements") -model Measurement { - @doc("The measurement identifier.") - @key - measurementId: string; - - @doc("The storage account location which contains the measurement") - location: string; - - @doc("The UTC time the measurement was ingested at") - ingestTimestampUtc?: zonedDateTime; - ...CommonResourceEndpoint; - - @doc(" The ID of the external package (for example, the disk which contained data) as specified by the customer upon data ingestion") - externalPackageId?: string; - - @doc("ID of the upload process which caused the creation of this measurement") - uploadId?: string; - - @doc("ID of the discovery process which caused the creation of this measurement") - discoveryId?: string; - - @doc("The UTC time the measurement was recorded at") - recordTimestampUtc?: zonedDateTime; - ...Azure.Core.Foundations.Extensions.CustomEtagProperty; -} - -@doc("Custom query data set: Measurement and metadata.") -model MeasurementWithMetadata { - ...Measurement; - ...MeasurementMetadataBase; -} - -@doc("Measurement processing result.") -@resource("processingResults") -@parentResource(Measurement) -model MeasurementProcessingResults { - @doc( - """ - The {name} identifier. - Not in use as this is a singleton resource. - TODO: check with CADL team how to define a singleton child resource without key. - """, - MeasurementProcessingResults - ) - @key - id: SingletonIdentifier; - ...MeasurementProcessingResultsBase; -} - -@doc("Measurement metadata without resource identifier.") -model MeasurementMetadataBase { - @doc("The measurement metadata dictionary") - metadata: Record; -} - -@doc("Measurement metadata.") -@resource("metadata") -@parentResource(Measurement) -model MeasurementMetadata { - @doc( - """ - The {name} identifier. - Not in use as this is a singleton resource. - TODO: check with CADL team how to define a singleton child resource without key. - """, - MeasurementMetadata - ) - @key - id: SingletonIdentifier; - ...MeasurementMetadataBase; -} - -@doc("Measurement metadata file information model.") -model MeasurementMetadataFileInfoBase { - @doc("The measurement's metadata file name") - metadataFileName: string; - - @doc(""" - SAS signed URI to measurement metadata file. - If file already exists on storage then ETag of this file will be returned in the response header. - This URI expires in 24 hours. - """) - metadataFileUri: url; - ...EtagResponseEnvelope; -} - -@doc("Measurement metadata file information resource.") -@resource("metadataFileInfo") -@parentResource(Measurement) -model MeasurementMetadataFileInfo { - @doc( - """ - The {name} identifier. - Not in use as this is a singleton resource. - TODO: check with CADL team how to define a singleton child resource without key. - """, - MeasurementMetadataFileInfo - ) - @key - id: SingletonIdentifier; - ...MeasurementMetadataFileInfoBase; -} - -@doc("Measurement metadata schema file information model.") -model MeasurementMetadataSchemaFileInfoBase { - @doc("Measurement schema file name.") - schemaFileName?: string; - - @doc(""" - SAS signed URI for downloading the measurement metadata schema file from Azure Storage. - This URI expires in 24 hours. - """) - schemaFileUri: url; -} - -@doc("Measurement metadata schema file information resource.") -@resource("metadataSchemaFileInfo") -@parentResource(Measurement) -model MeasurementMetadataSchemaFileInfo { - @doc( - """ - The {name} identifier. - Not in use as this is a singleton resource. - TODO: check with CADL team how to define a singleton child resource without key. - """, - MeasurementMetadataSchemaFileInfo - ) - @key - id: SingletonIdentifier; - ...MeasurementMetadataSchemaFileInfoBase; -} - -@doc("Request parameters for the complete upload metadata file API") -model CompleteUploadMetadataFileRequest { - @doc("The ETag of the uploaded metadata file") - pendingFileEtag: string; -} - -@doc("A wrapper for the List of measurements IDs") -model MeasurementListRequestParameters { - @doc("The measurement IDs list") - measurementIds: string[]; -} - -@doc("A wrapper for the List of measurements IDs") -model MeasurementIdList { - @doc("The measurement IDs list") - measurementIds: string[]; -} - -/* @summary("TODO: REMOVE - not in use") -@doc("Measurement metadata - new entries descriptor") -model MeasurementMetadataNewEntries { - @doc("The entries to be updated") - entries: MeasurementMetadataNewEntry[]; -} */ - -/* @summary("TODO: REMOVE - not in use") -@doc("Measurement metadata new entry information") -model MeasurementMetadataNewEntry { - ...CommonKeyValuePair; -} */ - -/* @summary("TODO: REMOVE - not in use") -@doc("Measurement metadata update entries") -model MeasurementMetadataUpdateEntries { - @doc("The entries to be updated") - entries: MeasurementMetadataUpdateEntry[]; -} - -@doc("Measurement metadata entry update information") -model MeasurementMetadataUpdateEntry { - @doc("The key") - key: string; - - @doc("The old value") - oldValue: string; - - @doc("The new value") - newValue: string; -} - -@summary("TODO: REMOVE - not in use") -@doc("An error that occurred while trying to fetch a measurement's schema file") -enum MeasurementSchemaErrorCode { - SchemaUriExtractionFailed: "SchemaUriExtractionFailed", - CustomerDefaultSchemaUriCouldNotBeResolved: "CustomerDefaultSchemaUriCouldNotBeResolved", - SchemaFetchingFailed: "SchemaFetchingFailed", - SavingSchemaToStorageFailed: "SavingSchemaToStorageFailed", - SchemaUriNotAllowedByTenant: "SchemaUriNotAllowedByTenant", - Unknown: "Unknown", -} - -@summary("TODO: REMOVE - not in use") -@doc("The measurement's execution status") -enum MeasurementStateExecutionStatus { - Running: "Running", - Succeeded: "Succeeded", - Failed: "Failed", - Deleting: "Deleting", -} -*/ - -@summary("TODO: REMOVE - not in use") -@doc("The measurement's validation result") -@withOptionalProperties -model MeasurementProcessingResultsBase { - @doc("The measurement's validity") - validationPassed: boolean; - - @doc("The measurement's rule validation results") - results: MeasurementRuleValidationResult[]; -} - -@doc("The result of evaluation of measurement validation rule") -@withOptionalProperties -model MeasurementRuleValidationResult { - @doc("Measurement validation rule category") - ruleCategory: string; - - @doc("Measurement validation rule name") - ruleName: string; - - @doc("Measurement validation rule metadata") - details: Record; - - @doc("Measurement validation rule evaluation result") - validationPassed: boolean; - - @doc("Measurement validation error message") - validationError?: string; -} diff --git a/packages/cadl-python/adp/Core/measurement/operations.cadl b/packages/cadl-python/adp/Core/measurement/operations.cadl deleted file mode 100644 index ef1de949a1f..00000000000 --- a/packages/cadl-python/adp/Core/measurement/operations.cadl +++ /dev/null @@ -1,121 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Azure.Core.Foundations.Extensions; -using OpenAPI; -using Autorest; - -namespace Adp.Core.Measurement; - -@tag("Measurement") -interface MeasurementOperations { - @doc("Get measurement by ID.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Deletes the measurement.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - delete is CustomLongRunningResourceDelete; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Lists the measurements in a workspace.") - getAll is CustomResourceList; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Lists the measurements in a workspace with extended metadata.") - queryMeasurementsWithMetadata is ResourceCollectionAction< - Measurement, - {}, - Page - >; - - @doc("Lists the measurements in a workspace that are in the given measurement IDs list.") - findByIds is ResourceCollectionAction< - Measurement, - CustomBodyWrapper, - Page - >; -} - -@tag("Measurement") -interface MeasurementMetadataOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("Returns the measurement metadata.") - @segmentOf(MeasurementMetadata) - get is CustomSingletonResourceRead< - MeasurementMetadata, - {}, - MeasurementMetadataBase - >; -} - -@tag("Measurement") -interface MeasurementProcessingResultsOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("Returns the measurement processing result.") - @segmentOf(MeasurementProcessingResults) - get is CustomSingletonResourceRead< - MeasurementProcessingResults, - {}, - MeasurementProcessingResultsBase - >; -} - -@tag("Measurement") -interface MeasurementStateMachineOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("Returns the state machine instance for the measurement.") - get is ResourceRead; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("List state machines instance for the measurement.") - getAll is CustomResourceList; - - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Initiates process of applying an action on the measurement.") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - act is CustomLongRunningResourceAction< - StateMachine, - CustomBodyWrapper - >; -} - -@tag("Measurement") -interface MeasurementMetadataFileInfoOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom operation." - @doc("Initiates a process that replaces the measurement's metadata file") - @extension("x-ms-long-running-operation", true) - @asyncOperationOptions("location") - @pollingOperation(LongRunningOperationStatus) - complete is CustomLongRunningResourceCollectionAction< - MeasurementMetadataFileInfo, - CustomBodyWrapper, - MeasurementMetadataFileInfoBase - >; - - @doc(""" - Returns SAS signed URI that allows uploading temporary measurement metadata file to Azure Storage. - This URI expires in 24 hours. - """) - getWritableUri is ResourceCollectionAction< - MeasurementMetadataFileInfo, - {}, - MeasurementMetadataFileInfoBase - >; -} - -@tag("Measurement") -interface MeasurementMetadataSchemaFileInfoOperations { - #suppress "@azure-tools/cadl-azure-core/use-standard-operations" "ADP data-plane API uses custom resource list operation." - @doc("Returns the measurement metadata schema file information.") - @segmentOf(MeasurementMetadataSchemaFileInfo) - get is CustomSingletonResourceRead< - MeasurementMetadataSchemaFileInfo, - {}, - MeasurementMetadataSchemaFileInfoBase - >; -} diff --git a/packages/cadl-python/adp/Core/models.cadl b/packages/cadl-python/adp/Core/models.cadl deleted file mode 100644 index 75c083fc760..00000000000 --- a/packages/cadl-python/adp/Core/models.cadl +++ /dev/null @@ -1,12 +0,0 @@ -using Cadl.Versioning; - -@versioned(Versions) -@versionedDependency( - [ - [ - Adp.Versions.v2023_00_00_for_public_preview, - Azure.Core.Versions.v1_0_Preview_1 - ] - ] -) -namespace Adp.Core; diff --git a/packages/cadl-python/adp/Core/operations.cadl b/packages/cadl-python/adp/Core/operations.cadl deleted file mode 100644 index c9b5e6f1722..00000000000 --- a/packages/cadl-python/adp/Core/operations.cadl +++ /dev/null @@ -1,17 +0,0 @@ -using Cadl.Http; -using Cadl.Rest; -using Azure.Core; -using Autorest; - -namespace Adp.Core; - -/* - This interface was added to solve the following cald compiler error - Compiler error message: 'Interface "LongRunningOperations" should have been projected already' - See: @cadl-lang\compiler\dist\core\projector.js - - Note, I think it happes because shared library has different namespace, i.e. Adp.Shared -*/ - -@tag("Long Running Operation") -op LongRunningOperationStatus is Adp.Shared.LongRunningOperations.getStatus; diff --git a/packages/cadl-python/adp/Core/package.json b/packages/cadl-python/adp/Core/package.json deleted file mode 100644 index 23048891219..00000000000 --- a/packages/cadl-python/adp/Core/package.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "name": "@cadl-api-spec/adp-core", - "version": "0.1.0", - "description": "ADP Core API", - "private": true, - "main": "index.js", - "cadlMain": "client.cadl", - "config": { - "verbose": " -Verbose", - "CoreOutputDirectory": "../data-plane/Adp.Core", - "CorePublicOutputFile": "preview/2023-00-00-preview/adp-core-api.json", - "PublicClientPath": "../generated/clients/Core/Clients.Core.vDraftCompliant", - "PublicClientNamespace": "Microsoft.Azure.Adp.Core.Clients.vDraftCompliant", - "PublishCorePublicOutputFileName": "../../../../draftcompliant/apispec.core.2023-00-00-draftcompliant.json", - "AutorestManifestFile": "../src/scripts/autorest.md", - "RepositoryRootDirectory": "../../../../../../.." - }, - "scripts": { - "lint": "cadl compile . --warn-as-error --import @cadl-lang/library-linter --no-emit", - "format": "npm run _formatCadl && npm run _formatJs", - "validate": "npm run _validateOpenApiSpec && npm run _validateExamples", - "build": "npm run format && npx cadl compile . && npm run validate", - "publish": "pwsh ../src/scripts/publish.ps1 %npm_package_config_verbose% -SourceOpenApiSpecPath %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile% -OutputOpenApiSpecPath %npm_package_config_PublishCorePublicOutputFileName%", - "check-version-mismatch": "syncpack list-mismatches", - "fix-version-mismatch": "syncpack fix-mismatches", - "_refreshVSToken": "vsts-npm-auth -config %npm_package_config_RepositoryRootDirectory%/.npmrc", - "_validateOpenApiSpec": "pwsh ../src/scripts/validate-spec.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", - "_validateExamples": "pwsh ../src/scripts/validate-examples.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", - "_compile": "pwsh ../src/scripts/compile.ps1 -IsPublicApi -InputCadl . -OutputPath %npm_package_config_CoreOutputDirectory% -OutputFile %npm_package_config_CorePublicOutputFile%", - "_generateClientWithAutoRest": "pwsh ../src/scripts/generate-autorest-client.ps1 -UseLatestAutoRestVersion -InputOpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile% -OutputPath %npm_package_config_PublicClientPath%/generated -Namespace %npm_package_config_PublicClientNamespace% -AutorestManifestFile %npm_package_config_AutorestManifestFile%", - "_generateExamples": "pwsh ../src/scripts/generate-examples.ps1 -OpenApiSpecFile %npm_package_config_CoreOutputDirectory%/%npm_package_config_CorePublicOutputFile%", - "_formatCadl": "npx cadl format --pretty ./**/*.cadl", - "_formatJs": "prettier --write \"**/*.+(js|json)\"" - }, - "keywords": [], - "author": "Microsoft Corporation", - "license": "MIT", - "peerDependencies": { - "@cadl-api-spec/adp-shared": "../Adp.Shared" - }, - "devDependencies": { - "@azure-tools/cadl-autorest": "~0.24.0", - "@azure-tools/cadl-azure-core": "~0.24.0", - "@azure-tools/cadl-csharp": "^0.1.11-beta.20221229.1", - "@azure-tools/cadl-dpg": "~0.24.0", - "@cadl-lang/compiler": "0.38.5", - "@cadl-lang/library-linter": "~0.38.0", - "@cadl-lang/openapi": "~0.38.0", - "@cadl-lang/openapi3": "~0.38.0", - "@cadl-lang/rest": "0.38.0", - "@cadl-lang/versioning": "~0.38.0", - "avocado": "1.0.0", - "prettier": "^2.7.1", - "syncpack": "^8.2.4" - }, - "syncpack": { - "workspace": false, - "source": [ - "./package.json", - "../*/package.json" - ], - "versionGroups": [ - { - "dependencies": [ - "@cadl-lang/openapi" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.38.0" - }, - { - "dependencies": [ - "@cadl-lang/openapi3" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.38.0" - }, - { - "dependencies": [ - "@cadl-lang/rest" - ], - "packages": [ - "**" - ], - "pinVersion": "0.38.0" - }, - { - "dependencies": [ - "@cadl-lang/versioning" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.38.0" - }, - { - "dependencies": [ - "@azure-tools/cadl-autorest" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.24.0" - }, - { - "dependencies": [ - "@azure-tools/cadl-azure-core" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.24.0" - }, - { - "dependencies": [ - "@cadl-lang/compiler" - ], - "packages": [ - "**" - ], - "pinVersion": "0.38.5" - }, - { - "dependencies": [ - "@azure-tools/cadl-dpg" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.24.0" - }, - { - "dependencies": [ - "@azure-tools/cadl-csharp" - ], - "packages": [ - "**" - ], - "pinVersion": "0.1.11-beta.20221229.1" - }, - { - "dependencies": [ - "avocado" - ], - "packages": [ - "**" - ], - "pinVersion": "1.0.0" - }, - { - "dependencies": [ - "prettier" - ], - "packages": [ - "**" - ], - "pinVersion": "^2.7.1" - }, - { - "dependencies": [ - "syncpack" - ], - "packages": [ - "**" - ], - "pinVersion": "^8.2.4" - }, - { - "dependencies": [ - "@cadl-lang/library-linter" - ], - "packages": [ - "**" - ], - "pinVersion": "~0.38.0" - } - ] - } -} From 22126f1757503ed0876894a4c648d72f203617d8 Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Mon, 9 Jan 2023 15:21:03 +0800 Subject: [PATCH 4/5] lint --- packages/cadl-python/src/emitter.ts | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/packages/cadl-python/src/emitter.ts b/packages/cadl-python/src/emitter.ts index e3ccd256370..0c7a07d1a8c 100644 --- a/packages/cadl-python/src/emitter.ts +++ b/packages/cadl-python/src/emitter.ts @@ -52,7 +52,7 @@ import { HttpOperationResponseContent, HttpServer, isStatusCode, - HttpOperation + HttpOperation, } from "@cadl-lang/rest/http"; import { getAddedOn } from "@cadl-lang/versioning"; import { @@ -321,33 +321,22 @@ type BodyParameter = ParamBase & { defaultContentType: string; }; -function getBodyType( - program: Program, - route: HttpOperation -): Type { +function getBodyType(program: Program, route: HttpOperation): Type { let bodyModel = route.parameters.body?.type; if (bodyModel && bodyModel.kind === "Model" && route.operation) { - const resourceType = getResourceOperation( - program, - route.operation - )?.resourceType; + const resourceType = getResourceOperation(program, route.operation)?.resourceType; if (resourceType && route.responses && route.responses.length > 0) { const resp = route.responses[0]; if (resp && resp.responses && resp.responses.length > 0) { const responseBody = resp.responses[0]?.body; if (responseBody?.type?.kind === "Model") { - const bodyTypeInResponse = getEffectiveSchemaType( - program, - responseBody.type - ); + const bodyTypeInResponse = getEffectiveSchemaType(program, responseBody.type); // response body type is reosurce type, and request body type (if templated) contains resource type if ( bodyTypeInResponse === resourceType && bodyModel.templateArguments && bodyModel.templateArguments.some((it) => { - return it.kind === "Model" || it.kind === "Union" - ? it === bodyTypeInResponse - : false; + return it.kind === "Model" || it.kind === "Union" ? it === bodyTypeInResponse : false; }) ) { bodyModel = resourceType; From 1dae1a5f7e61d84dce8ecf60642c841a89b11d7c Mon Sep 17 00:00:00 2001 From: Changlong Liu Date: Mon, 9 Jan 2023 17:35:53 +0800 Subject: [PATCH 5/5] changelog --- packages/cadl-python/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/cadl-python/CHANGELOG.md b/packages/cadl-python/CHANGELOG.md index 699fa0e616a..5950aa196dc 100644 --- a/packages/cadl-python/CHANGELOG.md +++ b/packages/cadl-python/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 2023-01-xx - 0.xx.xx + +**Bug Fixes** + +- Fix body type for spread model. #1659 + ## 2023-01-06 - 0.4.15 **Other Changes**