Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
6 changes: 4 additions & 2 deletions lib/services/mediaServicesManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ npm install azure-arm-mediaservices

## How to use

### Authentication, client creation and list operations as an example.
### Authentication, client creation and list accountFilters as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const AzureMediaServices = require("azure-arm-mediaservices");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new AzureMediaServices(creds, subscriptionId);
return client.operations.list().then((result) => {
const resourceGroupName = "testresourceGroupName";
const accountName = "testaccountName";
return client.accountFilters.list(resourceGroupName, accountName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default class AzureMediaServices extends AzureServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
Expand All @@ -56,10 +56,12 @@ export default class AzureMediaServices extends AzureServiceClient {
generateClientRequestId: boolean;

// Operation groups
accountFilters: operations.AccountFilters;
operations: operations.Operations;
mediaservices: operations.Mediaservices;
locations: operations.Locations;
assets: operations.Assets;
assetFilters: operations.AssetFilters;
contentKeyPolicies: operations.ContentKeyPolicies;
transforms: operations.Transforms;
jobs: operations.Jobs;
Expand Down
10 changes: 6 additions & 4 deletions lib/services/mediaServicesManagement/lib/azureMediaServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class AzureMediaServices extends ServiceClient {
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
Expand All @@ -50,7 +50,7 @@ class AzureMediaServices extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-06-01-preview';
this.apiVersion = '2018-07-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -72,10 +72,12 @@ class AzureMediaServices extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.accountFilters = new operations.AccountFilters(this);
this.operations = new operations.Operations(this);
this.mediaservices = new operations.Mediaservices(this);
this.locations = new operations.Locations(this);
this.assets = new operations.Assets(this);
this.assetFilters = new operations.AssetFilters(this);
this.contentKeyPolicies = new operations.ContentKeyPolicies(this);
this.transforms = new operations.Transforms(this);
this.jobs = new operations.Jobs(this);
Expand Down
119 changes: 119 additions & 0 deletions lib/services/mediaServicesManagement/lib/models/accountFilter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/*
* 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.
*/

'use strict';

const models = require('./index');

/**
* An Account Filter.
*
* @extends models['ProxyResource']
*/
class AccountFilter extends models['ProxyResource'] {
/**
* Create a AccountFilter.
* @member {object} [presentationTimeRange] The presentation time range.
* @member {number} [presentationTimeRange.startTimestamp] The absolute start
* time boundary.
* @member {number} [presentationTimeRange.endTimestamp] The absolute end
* time boundary.
* @member {number} [presentationTimeRange.presentationWindowDuration] The
* relative to end sliding window.
* @member {number} [presentationTimeRange.liveBackoffDuration] The relative
* to end right edge.
* @member {number} [presentationTimeRange.timescale] The time scale of time
* stamps.
* @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator
* of forcing exsiting of end time stamp.
* @member {object} [firstQuality] The first quality.
* @member {number} [firstQuality.bitrate] The first quality bitrate.
* @member {array} [tracks] The tracks selection conditions.
*/
constructor() {
super();
}

/**
* Defines the metadata of AccountFilter
*
* @returns {object} metadata of AccountFilter
*
*/
mapper() {
return {
required: false,
serializedName: 'AccountFilter',
type: {
name: 'Composite',
className: 'AccountFilter',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
presentationTimeRange: {
required: false,
serializedName: 'properties.presentationTimeRange',
type: {
name: 'Composite',
className: 'PresentationTimeRange'
}
},
firstQuality: {
required: false,
serializedName: 'properties.firstQuality',
type: {
name: 'Composite',
className: 'FirstQuality'
}
},
tracks: {
required: false,
serializedName: 'properties.tracks',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'FilterTrackSelectionElementType',
type: {
name: 'Composite',
className: 'FilterTrackSelection'
}
}
}
}
}
}
};
}
}

module.exports = AccountFilter;
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* 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.
*/

'use strict';

/**
* A collection of AccountFilter items.
*/
class AccountFilterCollection extends Array {
/**
* Create a AccountFilterCollection.
* @member {string} [odatanextLink] A link to the next page of the collection
* (when the collection contains too many results to return in one response).
*/
constructor() {
super();
}

/**
* Defines the metadata of AccountFilterCollection
*
* @returns {object} metadata of AccountFilterCollection
*
*/
mapper() {
return {
required: false,
serializedName: 'AccountFilterCollection',
type: {
name: 'Composite',
className: 'AccountFilterCollection',
modelProperties: {
value: {
required: false,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AccountFilterElementType',
type: {
name: 'Composite',
className: 'AccountFilter'
}
}
}
},
odatanextLink: {
required: false,
serializedName: '@odata\\.nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AccountFilterCollection;
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Akamai access control
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AkamaiSignatureHeaderAuthenticationKey {
* Create a AkamaiSignatureHeaderAuthenticationKey.
* @member {string} [identifier] identifier of the key
* @member {string} [base64Key] authentication key
* @member {date} [expiration] The exact time the authentication key.
* @member {date} [expiration] The expiration time of the authentication key.
*/
constructor() {
}
Expand Down
4 changes: 1 addition & 3 deletions lib/services/mediaServicesManagement/lib/models/apiError.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@

'use strict';

const models = require('./index');

/**
* The API error.
*
*/
class ApiError {
/**
* Create a ApiError.
* @member {object} [error] The error properties.
* @member {object} [error] ApiError. The error properties.
* @member {string} [error.code] A language-independent error name.
* @member {string} [error.message] The error message.
* @member {string} [error.target] The target of the error (for example, the
Expand Down
4 changes: 4 additions & 0 deletions lib/services/mediaServicesManagement/lib/models/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Asset extends models['ProxyResource'] {
},
assetId: {
required: false,
nullable: false,
readOnly: true,
serializedName: 'properties.assetId',
type: {
Expand All @@ -83,6 +84,7 @@ class Asset extends models['ProxyResource'] {
},
created: {
required: false,
nullable: false,
readOnly: true,
serializedName: 'properties.created',
type: {
Expand All @@ -91,6 +93,7 @@ class Asset extends models['ProxyResource'] {
},
lastModified: {
required: false,
nullable: false,
readOnly: true,
serializedName: 'properties.lastModified',
type: {
Expand Down Expand Up @@ -127,6 +130,7 @@ class Asset extends models['ProxyResource'] {
},
storageEncryptionFormat: {
required: false,
nullable: false,
readOnly: true,
serializedName: 'properties.storageEncryptionFormat',
type: {
Expand Down
Loading