diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 8aee79f5130d..b0200e9b3ffc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4063,7 +4063,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220929 + typescript: 4.9.0-dev.20220930 dev: false /downlevel-dts/0.8.0: @@ -9078,8 +9078,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220929: - resolution: {integrity: sha512-D4q6Fx3w/u1eZH22OgSEn2WZReEEUNXtEUWwpKi9sxvS6db58EHUAnUSz/uFD/RSlyPpgUNM5Wg/Rb4oqUiMvw==} + /typescript/4.9.0-dev.20220930: + resolution: {integrity: sha512-rYlFj6/BJohmUALnr/M54Ch1YJ5xgaTZvGKvKbk2KI0wnwJMr62dKv9DD9YUUGwd0VPVPXj4QsTOY1nWk21zVw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11915,12 +11915,12 @@ packages: dev: false file:projects/arm-devcenter.tgz: - resolution: {integrity: sha512-JDzPyJDTchEgS9eBLHz4wWbWoWMKmCxU+eZTOEwpPnitw3HhUmdAsInU/zMqWVKNZQs1fLEuPtPO59leplVrEg==, tarball: file:projects/arm-devcenter.tgz} + resolution: {integrity: sha512-AwOM7pau2B5ArHiegmUHhB80KpkdjSUUN7V3Yhx+GHHiIETnDrdtrezExE3jsfZe5wbSHAm3Tef8jy9tVu7gxw==, tarball: file:projects/arm-devcenter.tgz} name: '@rush-temp/arm-devcenter' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.31.1 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.0 '@rollup/plugin-json': 4.1.0_rollup@2.79.0 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.0 @@ -11934,7 +11934,7 @@ packages: rollup: 2.79.0 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.0 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' diff --git a/sdk/devcenter/arm-devcenter/CHANGELOG.md b/sdk/devcenter/arm-devcenter/CHANGELOG.md index cf0cb160a750..e3231ba0dadd 100644 --- a/sdk/devcenter/arm-devcenter/CHANGELOG.md +++ b/sdk/devcenter/arm-devcenter/CHANGELOG.md @@ -1,15 +1,22 @@ # Release History + +## 1.0.0-beta.2 (2022-09-30) + +**Features** -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group ProjectAllowedEnvironmentTypes + - Added Interface AllowedEnvironmentType + - Added Interface AllowedEnvironmentTypeListResult + - Added Interface ProjectAllowedEnvironmentTypesGetOptionalParams + - Added Interface ProjectAllowedEnvironmentTypesListNextOptionalParams + - Added Interface ProjectAllowedEnvironmentTypesListOptionalParams + - Added Type Alias ProjectAllowedEnvironmentTypesGetResponse + - Added Type Alias ProjectAllowedEnvironmentTypesListNextResponse + - Added Type Alias ProjectAllowedEnvironmentTypesListResponse + - Interface OperationStatus has a new optional parameter resourceId + - Class DevCenterClient has a new parameter projectAllowedEnvironmentTypes + + ## 1.0.0-beta.1 (2022-08-15) The package of @azure/arm-devcenter is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/devcenter/arm-devcenter/README.md b/sdk/devcenter/arm-devcenter/README.md index 30164d6a5df7..c967abd59f45 100644 --- a/sdk/devcenter/arm-devcenter/README.md +++ b/sdk/devcenter/arm-devcenter/README.md @@ -13,7 +13,7 @@ DevCenter Management API ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/devcenter/arm-devcenter/_meta.json b/sdk/devcenter/arm-devcenter/_meta.json index 40f8cd95f72f..32e711e041a9 100644 --- a/sdk/devcenter/arm-devcenter/_meta.json +++ b/sdk/devcenter/arm-devcenter/_meta.json @@ -1,8 +1,8 @@ { - "commit": "405811c51aa09803caedfe17fd305e110db1ca5e", + "commit": "7d3bcc6f88331e8c5fecdd251dd85d37eb9d8329", "readme": "specification/devcenter/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\devcenter\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/devcenter/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220721.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.3", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/devcenter/arm-devcenter/package.json b/sdk/devcenter/arm-devcenter/package.json index b6abddd2480d..47c8e8ecacd2 100644 --- a/sdk/devcenter/arm-devcenter/package.json +++ b/sdk/devcenter/arm-devcenter/package.json @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-devcenter.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-devcenter?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md b/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md index 42bfaf47666b..b139f721581e 100644 --- a/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md +++ b/sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md @@ -13,6 +13,17 @@ import { PollOperationState } from '@azure/core-lro'; // @public export type ActionType = string; +// @public +export interface AllowedEnvironmentType extends Resource { + readonly provisioningState?: string; +} + +// @public +export interface AllowedEnvironmentTypeListResult { + readonly nextLink?: string; + readonly value?: AllowedEnvironmentType[]; +} + // @public export interface AttachedNetworkConnection extends Resource { readonly domainJoinType?: DomainJoinType; @@ -386,6 +397,8 @@ export class DevCenterClient extends coreClient.ServiceClient { // (undocumented) pools: Pools; // (undocumented) + projectAllowedEnvironmentTypes: ProjectAllowedEnvironmentTypes; + // (undocumented) projectEnvironmentTypes: ProjectEnvironmentTypes; // (undocumented) projects: Projects; @@ -1112,6 +1125,7 @@ export interface OperationStatus { readonly name?: string; readonly percentComplete?: number; readonly properties?: Record; + readonly resourceId?: string; readonly startTime?: Date; readonly status?: string; } @@ -1239,6 +1253,35 @@ export interface Project extends TrackedResource { readonly provisioningState?: string; } +// @public +export interface ProjectAllowedEnvironmentTypes { + get(resourceGroupName: string, projectName: string, environmentTypeName: string, options?: ProjectAllowedEnvironmentTypesGetOptionalParams): Promise; + list(resourceGroupName: string, projectName: string, options?: ProjectAllowedEnvironmentTypesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ProjectAllowedEnvironmentTypesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType; + +// @public +export interface ProjectAllowedEnvironmentTypesListNextOptionalParams extends coreClient.OperationOptions { + top?: number; +} + +// @public +export type ProjectAllowedEnvironmentTypesListNextResponse = AllowedEnvironmentTypeListResult; + +// @public +export interface ProjectAllowedEnvironmentTypesListOptionalParams extends coreClient.OperationOptions { + top?: number; +} + +// @public +export type ProjectAllowedEnvironmentTypesListResponse = AllowedEnvironmentTypeListResult; + // @public export interface ProjectEnvironmentType extends Resource { creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; diff --git a/sdk/devcenter/arm-devcenter/src/devCenterClient.ts b/sdk/devcenter/arm-devcenter/src/devCenterClient.ts index 455b08af3bb1..fc808216aa59 100644 --- a/sdk/devcenter/arm-devcenter/src/devCenterClient.ts +++ b/sdk/devcenter/arm-devcenter/src/devCenterClient.ts @@ -23,6 +23,7 @@ import { ImageVersionsImpl, CatalogsImpl, EnvironmentTypesImpl, + ProjectAllowedEnvironmentTypesImpl, ProjectEnvironmentTypesImpl, DevBoxDefinitionsImpl, OperationsImpl, @@ -42,6 +43,7 @@ import { ImageVersions, Catalogs, EnvironmentTypes, + ProjectAllowedEnvironmentTypes, ProjectEnvironmentTypes, DevBoxDefinitions, Operations, @@ -107,41 +109,34 @@ export class DevCenterClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-08-01-preview"; + this.apiVersion = options.apiVersion || "2022-09-01-preview"; this.devCenters = new DevCentersImpl(this); this.projects = new ProjectsImpl(this); this.attachedNetworks = new AttachedNetworksImpl(this); @@ -150,6 +145,9 @@ export class DevCenterClient extends coreClient.ServiceClient { this.imageVersions = new ImageVersionsImpl(this); this.catalogs = new CatalogsImpl(this); this.environmentTypes = new EnvironmentTypesImpl(this); + this.projectAllowedEnvironmentTypes = new ProjectAllowedEnvironmentTypesImpl( + this + ); this.projectEnvironmentTypes = new ProjectEnvironmentTypesImpl(this); this.devBoxDefinitions = new DevBoxDefinitionsImpl(this); this.operations = new OperationsImpl(this); @@ -198,6 +196,7 @@ export class DevCenterClient extends coreClient.ServiceClient { imageVersions: ImageVersions; catalogs: Catalogs; environmentTypes: EnvironmentTypes; + projectAllowedEnvironmentTypes: ProjectAllowedEnvironmentTypes; projectEnvironmentTypes: ProjectEnvironmentTypes; devBoxDefinitions: DevBoxDefinitions; operations: Operations; diff --git a/sdk/devcenter/arm-devcenter/src/models/index.ts b/sdk/devcenter/arm-devcenter/src/models/index.ts index a9c1eb577be2..cb05e5f6429e 100644 --- a/sdk/devcenter/arm-devcenter/src/models/index.ts +++ b/sdk/devcenter/arm-devcenter/src/models/index.ts @@ -290,6 +290,20 @@ export interface EnvironmentTypeUpdate { tags?: { [propertyName: string]: string }; } +/** Result of the allowed environment type list operation. */ +export interface AllowedEnvironmentTypeListResult { + /** + * Current page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: AllowedEnvironmentType[]; + /** + * URL to get the next set of results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Result of the project environment type list operation. */ export interface ProjectEnvironmentTypeListResult { /** @@ -502,6 +516,11 @@ export interface OperationStatus { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: string; + /** + * The id of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceId?: string; /** * The start time of the operation * NOTE: This property will not be serialized. It can only be populated by the server. @@ -814,6 +833,15 @@ export interface EnvironmentType extends Resource { readonly provisioningState?: string; } +/** Represents an allowed environment type. */ +export interface AllowedEnvironmentType extends Resource { + /** + * The provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + /** Represents an environment type. */ export interface ProjectEnvironmentType extends Resource { /** Resource tags. */ @@ -1935,6 +1963,33 @@ export interface EnvironmentTypesListByDevCenterNextOptionalParams /** Contains response data for the listByDevCenterNext operation. */ export type EnvironmentTypesListByDevCenterNextResponse = EnvironmentTypeListResult; +/** Optional parameters. */ +export interface ProjectAllowedEnvironmentTypesListOptionalParams + extends coreClient.OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; +} + +/** Contains response data for the list operation. */ +export type ProjectAllowedEnvironmentTypesListResponse = AllowedEnvironmentTypeListResult; + +/** Optional parameters. */ +export interface ProjectAllowedEnvironmentTypesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType; + +/** Optional parameters. */ +export interface ProjectAllowedEnvironmentTypesListNextOptionalParams + extends coreClient.OperationOptions { + /** The maximum number of resources to return from the operation. Example: '$top=10'. */ + top?: number; +} + +/** Contains response data for the listNext operation. */ +export type ProjectAllowedEnvironmentTypesListNextResponse = AllowedEnvironmentTypeListResult; + /** Optional parameters. */ export interface ProjectEnvironmentTypesListOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/devcenter/arm-devcenter/src/models/mappers.ts b/sdk/devcenter/arm-devcenter/src/models/mappers.ts index ccf9f3a14124..360cd402cda8 100644 --- a/sdk/devcenter/arm-devcenter/src/models/mappers.ts +++ b/sdk/devcenter/arm-devcenter/src/models/mappers.ts @@ -632,6 +632,35 @@ export const EnvironmentTypeUpdate: coreClient.CompositeMapper = { } }; +export const AllowedEnvironmentTypeListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedEnvironmentTypeListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AllowedEnvironmentType" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ProjectEnvironmentTypeListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1102,6 +1131,13 @@ export const OperationStatus: coreClient.CompositeMapper = { name: "String" } }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String" + } + }, startTime: { serializedName: "startTime", readOnly: true, @@ -1753,6 +1789,23 @@ export const EnvironmentType: coreClient.CompositeMapper = { } }; +export const AllowedEnvironmentType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AllowedEnvironmentType", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ProjectEnvironmentType: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/devcenter/arm-devcenter/src/models/parameters.ts b/sdk/devcenter/arm-devcenter/src/models/parameters.ts index 5f3273174f19..4f7e03651c64 100644 --- a/sdk/devcenter/arm-devcenter/src/models/parameters.ts +++ b/sdk/devcenter/arm-devcenter/src/models/parameters.ts @@ -61,7 +61,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-08-01-preview", + defaultValue: "2022-09-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/devcenter/arm-devcenter/src/operations/index.ts b/sdk/devcenter/arm-devcenter/src/operations/index.ts index 769e93dedc14..e7ddb809806a 100644 --- a/sdk/devcenter/arm-devcenter/src/operations/index.ts +++ b/sdk/devcenter/arm-devcenter/src/operations/index.ts @@ -14,6 +14,7 @@ export * from "./images"; export * from "./imageVersions"; export * from "./catalogs"; export * from "./environmentTypes"; +export * from "./projectAllowedEnvironmentTypes"; export * from "./projectEnvironmentTypes"; export * from "./devBoxDefinitions"; export * from "./operations"; diff --git a/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts b/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts new file mode 100644 index 000000000000..e74fed7d94de --- /dev/null +++ b/sdk/devcenter/arm-devcenter/src/operations/projectAllowedEnvironmentTypes.ts @@ -0,0 +1,222 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ProjectAllowedEnvironmentTypes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DevCenterClient } from "../devCenterClient"; +import { + AllowedEnvironmentType, + ProjectAllowedEnvironmentTypesListNextOptionalParams, + ProjectAllowedEnvironmentTypesListOptionalParams, + ProjectAllowedEnvironmentTypesListResponse, + ProjectAllowedEnvironmentTypesGetOptionalParams, + ProjectAllowedEnvironmentTypesGetResponse, + ProjectAllowedEnvironmentTypesListNextResponse +} from "../models"; + +/// +/** Class containing ProjectAllowedEnvironmentTypes operations. */ +export class ProjectAllowedEnvironmentTypesImpl + implements ProjectAllowedEnvironmentTypes { + private readonly client: DevCenterClient; + + /** + * Initialize a new instance of the class ProjectAllowedEnvironmentTypes class. + * @param client Reference to the service client + */ + constructor(client: DevCenterClient) { + this.client = client; + } + + /** + * Lists allowed environment types for a project. + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + projectName: string, + options?: ProjectAllowedEnvironmentTypesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, projectName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, projectName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + projectName: string, + options?: ProjectAllowedEnvironmentTypesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, projectName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + projectName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + projectName: string, + options?: ProjectAllowedEnvironmentTypesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + projectName, + options + )) { + yield* page; + } + } + + /** + * Lists allowed environment types for a project. + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + projectName: string, + options?: ProjectAllowedEnvironmentTypesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, projectName, options }, + listOperationSpec + ); + } + + /** + * Gets an allowed environment type. + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param environmentTypeName The name of the environment type. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + projectName: string, + environmentTypeName: string, + options?: ProjectAllowedEnvironmentTypesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, projectName, environmentTypeName, options }, + getOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + projectName: string, + nextLink: string, + options?: ProjectAllowedEnvironmentTypesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, projectName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AllowedEnvironmentTypeListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.projectName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AllowedEnvironmentType + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.projectName, + Parameters.environmentTypeName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AllowedEnvironmentTypeListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.top], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.projectName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts index 769e93dedc14..e7ddb809806a 100644 --- a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/index.ts @@ -14,6 +14,7 @@ export * from "./images"; export * from "./imageVersions"; export * from "./catalogs"; export * from "./environmentTypes"; +export * from "./projectAllowedEnvironmentTypes"; export * from "./projectEnvironmentTypes"; export * from "./devBoxDefinitions"; export * from "./operations"; diff --git a/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projectAllowedEnvironmentTypes.ts b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projectAllowedEnvironmentTypes.ts new file mode 100644 index 000000000000..f54b2b6915b3 --- /dev/null +++ b/sdk/devcenter/arm-devcenter/src/operationsInterfaces/projectAllowedEnvironmentTypes.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AllowedEnvironmentType, + ProjectAllowedEnvironmentTypesListOptionalParams, + ProjectAllowedEnvironmentTypesGetOptionalParams, + ProjectAllowedEnvironmentTypesGetResponse +} from "../models"; + +/// +/** Interface representing a ProjectAllowedEnvironmentTypes. */ +export interface ProjectAllowedEnvironmentTypes { + /** + * Lists allowed environment types for a project. + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + projectName: string, + options?: ProjectAllowedEnvironmentTypesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an allowed environment type. + * @param resourceGroupName Name of the resource group within the Azure subscription. + * @param projectName The name of the project. + * @param environmentTypeName The name of the environment type. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + projectName: string, + environmentTypeName: string, + options?: ProjectAllowedEnvironmentTypesGetOptionalParams + ): Promise; +} diff --git a/sdk/devcenter/arm-devcenter/tsconfig.json b/sdk/devcenter/arm-devcenter/tsconfig.json index 4840dfd287a6..3e6ae96443f3 100644 --- a/sdk/devcenter/arm-devcenter/tsconfig.json +++ b/sdk/devcenter/arm-devcenter/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-devcenter": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"