From 46f1c4100f8df614556a3ad3fa6fc448659d8e11 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Feb 2020 20:44:07 +0000 Subject: [PATCH] Generated from 497f37d011e45d90e7a5f190b1326ec89e2719c8 Merge pull request #6 from Khushboo-Baheti/master merge --- .../arm-containerregistry/LICENSE.txt | 2 +- .../arm-containerregistry/README.md | 5 +- .../arm-containerregistry/package.json | 14 +- .../arm-containerregistry/rollup.config.js | 2 +- .../src/containerRegistryManagementClient.ts | 2 + .../arm-containerregistry/src/models/index.ts | 289 ++++++++++++- .../src/models/mappers.ts | 205 ++++++++- .../src/models/parameters.ts | 12 +- .../src/models/registriesMappers.ts | 6 +- .../src/models/replicationsMappers.ts | 10 +- .../src/models/runsMappers.ts | 13 +- .../src/models/scopeMapsMappers.ts | 10 +- .../src/models/taskRunsMappers.ts | 71 ++++ .../src/models/tasksMappers.ts | 13 +- .../src/models/tokensMappers.ts | 10 +- .../src/models/webhooksMappers.ts | 10 +- .../src/operations/index.ts | 1 + .../src/operations/registries.ts | 4 +- .../src/operations/runs.ts | 12 +- .../src/operations/taskRuns.ts | 402 ++++++++++++++++++ .../src/operations/tasks.ts | 14 +- .../arm-containerregistry/tsconfig.json | 2 +- 22 files changed, 1038 insertions(+), 71 deletions(-) create mode 100644 sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts create mode 100644 sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts diff --git a/sdk/containerregistry/arm-containerregistry/LICENSE.txt b/sdk/containerregistry/arm-containerregistry/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/containerregistry/arm-containerregistry/LICENSE.txt +++ b/sdk/containerregistry/arm-containerregistry/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/containerregistry/arm-containerregistry/README.md b/sdk/containerregistry/arm-containerregistry/README.md index fb3e085086d8..6ad1648b1ed9 100644 --- a/sdk/containerregistry/arm-containerregistry/README.md +++ b/sdk/containerregistry/arm-containerregistry/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-containerregistry ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -99,4 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcontainerregistry%2Farm-containerregistry%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/containerregistry/arm-containerregistry/README.png) diff --git a/sdk/containerregistry/arm-containerregistry/package.json b/sdk/containerregistry/arm-containerregistry/package.json index ac283ac248ae..da51e0c48f65 100644 --- a/sdk/containerregistry/arm-containerregistry/package.json +++ b/sdk/containerregistry/arm-containerregistry/package.json @@ -4,9 +4,9 @@ "description": "ContainerRegistryManagementClient Library with typescript type definitions for node.js and browser.", "version": "7.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/containerRegistryManagementClient.js", "types": "./esm/containerRegistryManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/containerregistry/arm-containerregistry", "repository": { diff --git a/sdk/containerregistry/arm-containerregistry/rollup.config.js b/sdk/containerregistry/arm-containerregistry/rollup.config.js index 75df723c2ed4..66c48646cb11 100644 --- a/sdk/containerregistry/arm-containerregistry/rollup.config.js +++ b/sdk/containerregistry/arm-containerregistry/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts index 9458327f3697..6170e06aa4ba 100644 --- a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts +++ b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts @@ -22,6 +22,7 @@ class ContainerRegistryManagementClient extends ContainerRegistryManagementClien replications: operations.Replications; webhooks: operations.Webhooks; runs: operations.Runs; + taskRuns: operations.TaskRuns; tasks: operations.Tasks; scopeMaps: operations.ScopeMaps; tokens: operations.Tokens; @@ -39,6 +40,7 @@ class ContainerRegistryManagementClient extends ContainerRegistryManagementClien this.replications = new operations.Replications(this); this.webhooks = new operations.Webhooks(this); this.runs = new operations.Runs(this); + this.taskRuns = new operations.TaskRuns(this); this.tasks = new operations.Tasks(this); this.scopeMaps = new operations.ScopeMaps(this); this.tokens = new operations.Tokens(this); diff --git a/sdk/containerregistry/arm-containerregistry/src/models/index.ts b/sdk/containerregistry/arm-containerregistry/src/models/index.ts index 749b2633cab0..3fe663aa44f3 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/index.ts @@ -157,7 +157,7 @@ export interface OperationMetricSpecificationDefinition { } /** - * The definition of Azure Monitoring metrics list. + * The definition of Azure Monitoring list. */ export interface OperationServiceSpecificationDefinition { /** @@ -208,7 +208,7 @@ export interface Sku { /** * The status of an Azure resource at the time the operation was called. */ -export interface Status1 { +export interface Status { /** * The short label for the status. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -290,7 +290,7 @@ export interface NetworkRuleSet { export interface QuarantinePolicy { /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -300,12 +300,12 @@ export interface QuarantinePolicy { */ export interface TrustPolicy { /** - * The type of trust policy. Possible values include: 'Notary' + * The type of trust policy. Possible values include: 'Notary'. Default value: 'Notary'. */ type?: TrustPolicyType; /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -315,7 +315,8 @@ export interface TrustPolicy { */ export interface RetentionPolicy { /** - * The number of days to retain manifest before it expires. + * The number of days to retain an untagged manifest after which it gets purged. Default value: + * 7. */ days?: number; /** @@ -325,7 +326,7 @@ export interface RetentionPolicy { readonly lastUpdatedTime?: Date; /** * The value that indicates whether the policy is enabled or not. Possible values include: - * 'enabled', 'disabled' + * 'enabled', 'disabled'. Default value: 'disabled'. */ status?: PolicyStatus; } @@ -405,7 +406,7 @@ export interface Registry extends Resource { * The status of the container registry at the time the operation was called. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: Status1; + readonly status?: Status; /** * The value that indicates whether the admin user is enabled. Default value: false. */ @@ -536,7 +537,7 @@ export interface Replication extends Resource { * The status of the replication at the time the operation was called. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: Status1; + readonly status?: Status; } /** @@ -1233,6 +1234,58 @@ export interface IdentityProperties { userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; } +/** + * The task run that has the ARM resource and properties. + * The task run will have the information of request and result of a run. + */ +export interface TaskRun extends Resource { + /** + * Identity for the resource. + */ + identity?: IdentityProperties; + /** + * The provisioning state of this task run. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The request (parameters) for the run + */ + runRequest?: RunRequestUnion; + /** + * The result of this task run + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly runResult?: Run; + /** + * How the run should be forced to rerun even if the run request configuration has not changed + */ + forceUpdateTag?: string; +} + +/** + * The parameters for updating a task run. + */ +export interface TaskRunUpdateParameters { + /** + * Identity for the resource. + */ + identity?: IdentityProperties; + /** + * The request (parameters) for the new run + */ + runRequest?: RunRequestUnion; + /** + * How the run should be forced to rerun even if the run request configuration has not changed + */ + forceUpdateTag?: string; + /** + * The ARM resource tags. + */ + tags?: { [propertyName: string]: string }; +} + /** * Properties that describe a base image dependency. */ @@ -1770,6 +1823,30 @@ export interface TaskUpdateParameters { tags?: { [propertyName: string]: string }; } +/** + * An error response from the Azure Container Registry service. + */ +export interface ErrorModel { + /** + * error code. + */ + code: string; + /** + * error message. + */ + message: string; +} + +/** + * An error response from the Azure Container Registry service. + */ +export interface ErrorSchema { + /** + * Azure container registry build API error body. + */ + error?: ErrorModel; +} + /** * The properties of a run argument. */ @@ -2279,8 +2356,8 @@ export interface ScopeMap extends ProxyResource { readonly provisioningState?: ProvisioningState; /** * The list of scoped permissions for registry artifacts. - * E.g. repositories/repository-name/pull, - * repositories/repository-name/delete + * E.g. repositories/repository-name/content/read, + * repositories/repository-name/metadata/write */ actions: string[]; } @@ -2301,6 +2378,23 @@ export interface ScopeMapUpdateParameters { actions?: string[]; } +/** + * The Active Directory Object that will be used for authenticating the token of a container + * registry. + */ +export interface ActiveDirectoryObject { + /** + * The user/group/application object ID for Active Directory Object that will be used for + * authenticating the token of a container registry. + */ + objectId?: string; + /** + * The tenant ID of user/group/application object Active Directory Object that will be used for + * authenticating the token of a container registry. + */ + tenantId?: string; +} + /** * The properties of a certificate used for authenticating a token. */ @@ -2329,7 +2423,7 @@ export interface TokenCertificate { */ export interface TokenPassword { /** - * The password created datetime of the password. + * The creation datetime of the password. */ creationTime?: Date; /** @@ -2337,7 +2431,8 @@ export interface TokenPassword { */ expiry?: Date; /** - * The password name "password" or "password2". Possible values include: 'password1', 'password2' + * The password name "password1" or "password2". Possible values include: 'password1', + * 'password2' */ name?: TokenPasswordName; /** @@ -2351,6 +2446,7 @@ export interface TokenPassword { * The properties of the credentials that can be used for authenticating the token. */ export interface TokenCredentialsProperties { + activeDirectoryObject?: ActiveDirectoryObject; certificates?: TokenCertificate[]; passwords?: TokenPassword[]; } @@ -2374,10 +2470,6 @@ export interface Token extends ProxyResource { * The resource ID of the scope map to which the token will be associated with. */ scopeMapId?: string; - /** - * The user/group/application object ID for which the token has to be created. - */ - objectId?: string; /** * The credentials that can be used for authenticating the token. */ @@ -2386,7 +2478,7 @@ export interface Token extends ProxyResource { * The status of the token example enabled or disabled. Possible values include: 'enabled', * 'disabled' */ - status?: Status; + status?: TokenStatus; } /** @@ -2401,7 +2493,7 @@ export interface TokenUpdateParameters { * The status of the token example enabled or disabled. Possible values include: 'enabled', * 'disabled' */ - status?: Status; + status?: TokenStatus; /** * The credentials that can be used for authenticating the token. */ @@ -2419,11 +2511,10 @@ export interface GenerateCredentialsParameters { tokenId?: string; /** * The expiry date of the generated credentials after which the credentials become invalid. - * Default value: new Date('9999-12-31T15:59:59.9999999-08:00'). */ expiry?: Date; /** - * Specifies name of the password which should be regenerated if any -- password or password2. + * Specifies name of the password which should be regenerated if any -- password1 or password2. * Possible values include: 'password1', 'password2' */ name?: TokenPasswordName; @@ -2537,6 +2628,18 @@ export interface RunListResult extends Array { nextLink?: string; } +/** + * @interface + * The collection of task runs. + * @extends Array + */ +export interface TaskRunListResult extends Array { + /** + * The URI that can be used to request the next set of paged results. + */ + nextLink?: string; +} + /** * @interface * The collection of tasks. @@ -2816,12 +2919,12 @@ export type TokenCertificateName = 'certificate1' | 'certificate2'; export type TokenPasswordName = 'password1' | 'password2'; /** - * Defines values for Status. + * Defines values for TokenStatus. * Possible values include: 'enabled', 'disabled' * @readonly * @enum {string} */ -export type Status = 'enabled' | 'disabled'; +export type TokenStatus = 'enabled' | 'disabled'; /** * Contains response data for the checkNameAvailability operation. @@ -3703,6 +3806,146 @@ export type RunsListNextResponse = RunListResult & { }; }; +/** + * Contains response data for the get operation. + */ +export type TaskRunsGetResponse = TaskRun & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRun; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type TaskRunsCreateResponse = TaskRun & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRun; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type TaskRunsUpdateResponse = TaskRun & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRun; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TaskRunsListResponse = TaskRunListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRunListResult; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type TaskRunsBeginCreateResponse = TaskRun & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRun; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type TaskRunsBeginUpdateResponse = TaskRun & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRun; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TaskRunsListNextResponse = TaskRunListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TaskRunListResult; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts index 3b7be0863436..a1db61743b2a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts @@ -339,11 +339,11 @@ export const Sku: msRest.CompositeMapper = { } }; -export const Status1: msRest.CompositeMapper = { +export const Status: msRest.CompositeMapper = { serializedName: "Status", type: { name: "Composite", - className: "Status1", + className: "Status", modelProperties: { displayStatus: { readOnly: true, @@ -485,6 +485,7 @@ export const QuarantinePolicy: msRest.CompositeMapper = { modelProperties: { status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -501,12 +502,14 @@ export const TrustPolicy: msRest.CompositeMapper = { modelProperties: { type: { serializedName: "type", + defaultValue: 'Notary', type: { name: "String" } }, status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -523,6 +526,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { modelProperties: { days: { serializedName: "days", + defaultValue: 7, type: { name: "Number" } @@ -536,6 +540,7 @@ export const RetentionPolicy: msRest.CompositeMapper = { }, status: { serializedName: "status", + defaultValue: 'disabled', type: { name: "String" } @@ -665,7 +670,7 @@ export const Registry: msRest.CompositeMapper = { serializedName: "properties.status", type: { name: "Composite", - className: "Status1" + className: "Status" } }, adminUserEnabled: { @@ -898,7 +903,7 @@ export const Replication: msRest.CompositeMapper = { serializedName: "properties.status", type: { name: "Composite", - className: "Status1" + className: "Status" } } } @@ -2033,6 +2038,93 @@ export const IdentityProperties: msRest.CompositeMapper = { } }; +export const TaskRun: msRest.CompositeMapper = { + serializedName: "TaskRun", + type: { + name: "Composite", + className: "TaskRun", + modelProperties: { + ...Resource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + runRequest: { + serializedName: "properties.runRequest", + type: { + name: "Composite", + className: "RunRequest" + } + }, + runResult: { + readOnly: true, + serializedName: "properties.runResult", + type: { + name: "Composite", + className: "Run" + } + }, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", + type: { + name: "String" + } + } + } + } +}; + +export const TaskRunUpdateParameters: msRest.CompositeMapper = { + serializedName: "TaskRunUpdateParameters", + type: { + name: "Composite", + className: "TaskRunUpdateParameters", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + runRequest: { + serializedName: "properties.runRequest", + type: { + name: "Composite", + className: "RunRequest" + } + }, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const BaseImageDependency: msRest.CompositeMapper = { serializedName: "BaseImageDependency", type: { @@ -2908,6 +3000,47 @@ export const TaskUpdateParameters: msRest.CompositeMapper = { } }; +export const ErrorModel: msRest.CompositeMapper = { + serializedName: "Error", + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorSchema: msRest.CompositeMapper = { + serializedName: "ErrorSchema", + type: { + name: "Composite", + className: "ErrorSchema", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; + export const Argument: msRest.CompositeMapper = { serializedName: "Argument", type: { @@ -3661,6 +3794,28 @@ export const ScopeMapUpdateParameters: msRest.CompositeMapper = { } }; +export const ActiveDirectoryObject: msRest.CompositeMapper = { + serializedName: "ActiveDirectoryObject", + type: { + name: "Composite", + className: "ActiveDirectoryObject", + modelProperties: { + objectId: { + serializedName: "objectId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + export const TokenCertificate: msRest.CompositeMapper = { serializedName: "TokenCertificate", type: { @@ -3736,6 +3891,13 @@ export const TokenCredentialsProperties: msRest.CompositeMapper = { name: "Composite", className: "TokenCredentialsProperties", modelProperties: { + activeDirectoryObject: { + serializedName: "activeDirectoryObject", + type: { + name: "Composite", + className: "ActiveDirectoryObject" + } + }, certificates: { serializedName: "certificates", type: { @@ -3791,12 +3953,6 @@ export const Token: msRest.CompositeMapper = { name: "String" } }, - objectId: { - serializedName: "properties.objectId", - type: { - name: "String" - } - }, credentials: { serializedName: "properties.credentials", type: { @@ -3857,7 +4013,6 @@ export const GenerateCredentialsParameters: msRest.CompositeMapper = { }, expiry: { serializedName: "expiry", - defaultValue: new Date('9999-12-31T15:59:59.9999999-08:00'), type: { name: "DateTime" } @@ -4068,6 +4223,34 @@ export const RunListResult: msRest.CompositeMapper = { } }; +export const TaskRunListResult: msRest.CompositeMapper = { + serializedName: "TaskRunListResult", + type: { + name: "Composite", + className: "TaskRunListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TaskRun" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const TaskListResult: msRest.CompositeMapper = { serializedName: "TaskListResult", type: { diff --git a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts index 28bc5f1e102b..6e0e28be2d49 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts @@ -140,7 +140,7 @@ export const scopeMapName: msRest.OperationURLParameter = { constraints: { MaxLength: 50, MinLength: 5, - Pattern: /^[a-zA-Z0-9-]*$/ + Pattern: /^[a-zA-Z0-9-_]*$/ }, type: { name: "String" @@ -172,6 +172,16 @@ export const taskName: msRest.OperationURLParameter = { } } }; +export const taskRunName: msRest.OperationURLParameter = { + parameterPath: "taskRunName", + mapper: { + required: true, + serializedName: "taskRunName", + type: { + name: "String" + } + } +}; export const tokenName: msRest.OperationURLParameter = { parameterPath: "tokenName", mapper: { diff --git a/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts index 6b1fa361e77a..0d01af51a4d2 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/registriesMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, @@ -21,6 +22,8 @@ export { DockerBuildStep, EncodedTaskRunRequest, EncodedTaskStep, + ErrorModel, + ErrorSchema, FileTaskRunRequest, FileTaskStep, GenerateCredentialsParameters, @@ -62,9 +65,10 @@ export { SourceTrigger, SourceTriggerDescriptor, SourceUploadDefinition, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, TaskRunRequest, TaskStepProperties, TimerTrigger, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts index db474e0504a4..0ddb2f9b3af5 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/replicationsMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, @@ -17,14 +18,18 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, Policies, ProxyResource, @@ -36,6 +41,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -44,9 +50,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts index 60c968c59c3a..4f65e85bdfb2 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/runsMappers.ts @@ -8,23 +8,29 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, BaseImageDependency, BaseImageTrigger, BaseResource, - CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + ErrorModel, + ErrorSchema, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, Policies, ProxyResource, @@ -36,6 +42,7 @@ export { Run, RunGetLogResult, RunListResult, + RunRequest, RunUpdateParameters, ScopeMap, SecretObject, @@ -45,9 +52,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts index 7acf439888cb..468987d85d1f 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/scopeMapsMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, @@ -17,14 +18,18 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, Policies, ProxyResource, @@ -34,6 +39,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, ScopeMapListResult, ScopeMapUpdateParameters, @@ -44,9 +50,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts new file mode 100644 index 000000000000..69c2cc6c344f --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/models/taskRunsMappers.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + ActiveDirectoryObject, + AgentProperties, + Argument, + AuthInfo, + BaseImageDependency, + BaseImageTrigger, + BaseResource, + Credentials, + CustomRegistryCredentials, + DockerBuildRequest, + DockerBuildStep, + EncodedTaskRunRequest, + EncodedTaskStep, + ErrorModel, + ErrorSchema, + FileTaskRunRequest, + FileTaskStep, + IdentityProperties, + ImageDescriptor, + ImageUpdateTrigger, + IPRule, + NetworkRuleSet, + OverrideTaskStepProperties, + PlatformProperties, + Policies, + ProxyResource, + QuarantinePolicy, + Registry, + Replication, + Resource, + RetentionPolicy, + Run, + RunRequest, + ScopeMap, + SecretObject, + SetValue, + Sku, + SourceProperties, + SourceRegistryCredentials, + SourceTrigger, + SourceTriggerDescriptor, + Status, + StorageAccountProperties, + Task, + TaskRun, + TaskRunListResult, + TaskRunRequest, + TaskRunUpdateParameters, + TaskStepProperties, + TimerTrigger, + TimerTriggerDescriptor, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TriggerProperties, + TrustPolicy, + UserIdentityProperties, + VirtualNetworkRule, + Webhook +} from "../models/mappers"; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts index 3cdb2ace5658..dce3762762c3 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/tasksMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, @@ -16,13 +17,17 @@ export { BaseImageTrigger, BaseImageTriggerUpdateParameters, BaseResource, - CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, DockerBuildStepUpdateParameters, + EncodedTaskRunRequest, EncodedTaskStep, EncodedTaskStepUpdateParameters, + ErrorModel, + ErrorSchema, + FileTaskRunRequest, FileTaskStep, FileTaskStepUpdateParameters, IdentityProperties, @@ -30,6 +35,7 @@ export { ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, PlatformUpdateParameters, Policies, @@ -40,6 +46,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -50,10 +57,12 @@ export { SourceTriggerDescriptor, SourceTriggerUpdateParameters, SourceUpdateParameters, - Status1, + Status, StorageAccountProperties, Task, TaskListResult, + TaskRun, + TaskRunRequest, TaskStepProperties, TaskStepUpdateParameters, TaskUpdateParameters, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts index 72b11906e68f..152030b1b5e0 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/tokensMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, AgentProperties, Argument, AuthInfo, @@ -17,14 +18,18 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, Policies, ProxyResource, @@ -34,6 +39,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -42,9 +48,11 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts index ba570b7f3e2f..fc5ac61298e3 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/webhooksMappers.ts @@ -8,6 +8,7 @@ export { discriminators, + ActiveDirectoryObject, Actor, AgentProperties, Argument, @@ -19,7 +20,9 @@ export { CloudError, Credentials, CustomRegistryCredentials, + DockerBuildRequest, DockerBuildStep, + EncodedTaskRunRequest, EncodedTaskStep, Event, EventContent, @@ -27,12 +30,14 @@ export { EventListResult, EventRequestMessage, EventResponseMessage, + FileTaskRunRequest, FileTaskStep, IdentityProperties, ImageDescriptor, ImageUpdateTrigger, IPRule, NetworkRuleSet, + OverrideTaskStepProperties, PlatformProperties, Policies, ProxyResource, @@ -43,6 +48,7 @@ export { Resource, RetentionPolicy, Run, + RunRequest, ScopeMap, SecretObject, SetValue, @@ -52,10 +58,12 @@ export { SourceRegistryCredentials, SourceTrigger, SourceTriggerDescriptor, - Status1, + Status, StorageAccountProperties, Target, Task, + TaskRun, + TaskRunRequest, TaskStepProperties, TimerTrigger, TimerTriggerDescriptor, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts index 1e3175a05f2c..100a348bd824 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts @@ -13,6 +13,7 @@ export * from "./operations"; export * from "./replications"; export * from "./webhooks"; export * from "./runs"; +export * from "./taskRuns"; export * from "./tasks"; export * from "./scopeMaps"; export * from "./tokens"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts index 6e7146247bff..b577f9262eae 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts @@ -732,7 +732,7 @@ const getBuildSourceUploadUrlOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.SourceUploadDefinition }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -891,7 +891,7 @@ const beginScheduleRunOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts index 8ce3e9f5e7ed..d49924a790a3 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts @@ -252,7 +252,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -278,7 +278,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Run }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -304,7 +304,7 @@ const getLogSasUrlOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunGetLogResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -340,7 +340,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Run }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -365,7 +365,7 @@ const beginCancelOperationSpec: msRest.OperationSpec = { 200: {}, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -386,7 +386,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RunListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts new file mode 100644 index 000000000000..17729964835e --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts @@ -0,0 +1,402 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/taskRunsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext"; + +/** Class representing a TaskRuns. */ +export class TaskRuns { + private readonly client: ContainerRegistryManagementClientContext; + + /** + * Create a TaskRuns. + * @param {ContainerRegistryManagementClientContext} client Reference to the service client. + */ + constructor(client: ContainerRegistryManagementClientContext) { + this.client = client; + } + + /** + * Gets the detailed information for a given task run. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The run request name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, registryName: string, taskRunName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + taskRunName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a task run for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The name of task run. + * @param taskRun The parameters of a run that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, registryName: string, taskRunName: string, taskRun: Models.TaskRun, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,registryName,taskRunName,taskRun,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a specified task run resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,registryName,taskRunName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates a task run with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param updateParameters The parameters for updating a task run. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, registryName: string, taskRunName: string, updateParameters: Models.TaskRunUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,registryName,taskRunName,updateParameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Lists all the task runs for a specified container registry. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, registryName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, registryName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + registryName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates a task run for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The name of task run. + * @param taskRun The parameters of a run that needs to scheduled. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, registryName: string, taskRunName: string, taskRun: Models.TaskRun, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + taskRun, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a specified task run resource. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, registryName: string, taskRunName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Updates a task run with the specified parameters. + * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param registryName The name of the container registry. + * @param taskRunName The task run name. + * @param updateParameters The parameters for updating a task run. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, registryName: string, taskRunName: string, updateParameters: Models.TaskRunUpdateParameters, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + registryName, + taskRunName, + updateParameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Lists all the task runs for a specified container registry. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRunListResult + }, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "taskRun", + mapper: { + ...Mappers.TaskRun, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + 201: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.taskRunName + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "updateParameters", + mapper: { + ...Mappers.TaskRunUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.TaskRun + }, + 201: { + bodyMapper: Mappers.TaskRun + }, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TaskRunListResult + }, + default: { + bodyMapper: Mappers.ErrorSchema + } + }, + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts index 1d473f71bbc9..825be1a6beb4 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts @@ -286,7 +286,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TaskListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -312,7 +312,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -338,7 +338,7 @@ const getDetailsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -374,7 +374,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -400,7 +400,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -436,7 +436,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Task }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer @@ -457,7 +457,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.TaskListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorSchema } }, serializer diff --git a/sdk/containerregistry/arm-containerregistry/tsconfig.json b/sdk/containerregistry/arm-containerregistry/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/containerregistry/arm-containerregistry/tsconfig.json +++ b/sdk/containerregistry/arm-containerregistry/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true