Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/databox/arm-databox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-databox) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databox) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand Down
8 changes: 4 additions & 4 deletions sdk/databox/arm-databox/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "756495dd7e0e2f5181039def47a8c85ff0787b66",
"commit": "5d31f53fbd070705e63e349221d291df3c33ac10",
"readme": "specification/databox/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.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\\databox\\resource-manager\\readme.md --use=@autorest/typescript@6.0.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --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/databox/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
"use": "@autorest/typescript@^6.0.4"
}
16 changes: 4 additions & 12 deletions sdk/databox/arm-databox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for DataBoxManagementClient.",
"version": "5.0.1",
"version": "1.0.0-beta.1",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.0",
"@azure/core-lro": "^2.5.3",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
Expand Down Expand Up @@ -111,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox"
}
4 changes: 2 additions & 2 deletions sdk/databox/arm-databox/src/dataBoxManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class DataBoxManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-databox/5.0.1`;
const packageDetails = `azsdk-js-arm-databox/1.0.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -109,7 +109,7 @@ export class DataBoxManagementClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-12-01";
this.apiVersion = options.apiVersion || "2023-03-01";
this.operations = new OperationsImpl(this);
this.jobs = new JobsImpl(this);
this.service = new ServiceImpl(this);
Expand Down
81 changes: 81 additions & 0 deletions sdk/databox/arm-databox/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,40 @@ export interface JobStages {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly jobStageDetails?: Record<string, unknown>;
/**
* Delay information for the job stages.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly delayInformation?: JobDelayDetails[];
}

/** Job Delay Notification details */
export interface JobDelayDetails {
/**
* Status of notification
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status?: DelayNotificationStatus;
/**
* Delay Error code
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly errorCode?: PortalDelayErrorCode;
/**
* Description of the delay.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly description?: string;
/**
* Timestamp when the delay notification was created.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly startTime?: Date;
/**
* Timestamp when the delay notification was resolved.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resolutionTime?: Date;
}

/** Contact Details. */
Expand Down Expand Up @@ -1832,6 +1866,11 @@ export interface JobResource extends Resource {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status?: StageName;
/**
* Name of the stage where delay might be present.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly delayedStage?: StageName;
/**
* Time at which the job was started in UTC ISO 8601 format.
* NOTE: This property will not be serialized. It can only be populated by the server.
Expand Down Expand Up @@ -2231,6 +2270,48 @@ export enum KnownStageName {
*/
export type StageName = string;

/** Known values of {@link DelayNotificationStatus} that the service accepts. */
export enum KnownDelayNotificationStatus {
/** Delay is still active */
Active = "Active",
/** Delay has been resolved */
Resolved = "Resolved"
}

/**
* Defines values for DelayNotificationStatus. \
* {@link KnownDelayNotificationStatus} can be used interchangeably with DelayNotificationStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Active**: Delay is still active \
* **Resolved**: Delay has been resolved
*/
export type DelayNotificationStatus = string;

/** Known values of {@link PortalDelayErrorCode} that the service accepts. */
export enum KnownPortalDelayErrorCode {
/** Delay due to any internal reasons */
InternalIssueDelay = "InternalIssueDelay",
/** Active Order limit breached. */
ActiveOrderLimitBreachedDelay = "ActiveOrderLimitBreachedDelay",
/** High demand */
ActiveOrderLimitBreachedDelay = "ActiveOrderLimitBreachedDelay",
/** Slow copy due to large number of files */
ActiveOrderLimitBreachedDelay = "ActiveOrderLimitBreachedDelay"
}

/**
* Defines values for PortalDelayErrorCode. \
* {@link KnownPortalDelayErrorCode} can be used interchangeably with PortalDelayErrorCode,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **InternalIssueDelay**: Delay due to any internal reasons \
* **ActiveOrderLimitBreachedDelay**: Active Order limit breached. \
* **ActiveOrderLimitBreachedDelay**: High demand \
* **ActiveOrderLimitBreachedDelay**: Slow copy due to large number of files
*/
export type PortalDelayErrorCode = string;

/** Known values of {@link NotificationStageName} that the service accepts. */
export enum KnownNotificationStageName {
/** Notification at device prepared stage. */
Expand Down
64 changes: 64 additions & 0 deletions sdk/databox/arm-databox/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,63 @@ export const JobStages: coreClient.CompositeMapper = {
name: "Dictionary",
value: { type: { name: "any" } }
}
},
delayInformation: {
serializedName: "delayInformation",
readOnly: true,
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "JobDelayDetails"
}
}
}
}
}
}
};

export const JobDelayDetails: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "JobDelayDetails",
modelProperties: {
status: {
serializedName: "status",
readOnly: true,
type: {
name: "String"
}
},
errorCode: {
serializedName: "errorCode",
readOnly: true,
type: {
name: "String"
}
},
description: {
serializedName: "description",
readOnly: true,
type: {
name: "String"
}
},
startTime: {
serializedName: "startTime",
readOnly: true,
type: {
name: "DateTime"
}
},
resolutionTime: {
serializedName: "resolutionTime",
readOnly: true,
type: {
name: "DateTime"
}
}
}
}
Expand Down Expand Up @@ -4023,6 +4080,13 @@ export const JobResource: coreClient.CompositeMapper = {
name: "String"
}
},
delayedStage: {
serializedName: "properties.delayedStage",
readOnly: true,
type: {
name: "String"
}
},
startTime: {
serializedName: "properties.startTime",
readOnly: true,
Expand Down
2 changes: 1 addition & 1 deletion sdk/databox/arm-databox/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const $host: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2022-12-01",
defaultValue: "2023-03-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
43 changes: 43 additions & 0 deletions sdk/databox/arm-databox/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* 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 {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/databox/arm-databox/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-databox": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down