Skip to content

Commit

Permalink
CodeGen from PR 12885 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Updating readme.md of marketplaceOrdering with new version (Azure#12885)
  • Loading branch information
SDKAuto committed Feb 8, 2021
1 parent ea1b3fc commit 0e09777
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 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
Expand Down
9 changes: 4 additions & 5 deletions sdk/marketplaceordering/arm-marketplaceordering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-marketplaceordering

### How to use

#### nodejs - Authentication, client creation and get marketplaceAgreements as an example written in TypeScript.
#### nodejs - client creation and get marketplaceAgreements as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { MarketplaceOrderingAgreements, MarketplaceOrderingAgreementsModels, MarketplaceOrderingAgreementsMappers } from "@azure/arm-marketplaceordering";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { MarketplaceOrderingAgreements } = require("@azure/arm-marketplaceordering");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -44,7 +43,7 @@ export class MarketplaceOrderingAgreementsContext extends msRestAzure.AzureServi

super(credentials, options);

this.apiVersion = '2015-06-01';
this.apiVersion = '2021-01-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand All @@ -11,6 +11,38 @@ import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

/**
* Metadata pertaining to creation and last modification of the resource.
*/
export interface SystemData {
/**
* The identity that created the resource.
*/
createdBy?: string;
/**
* The type of identity that created the resource. Possible values include: 'User',
* 'Application', 'ManagedIdentity', 'Key'
*/
createdByType?: CreatedByType;
/**
* The timestamp of resource creation (UTC).
*/
createdAt?: Date;
/**
* The identity that last modified the resource.
*/
lastModifiedBy?: string;
/**
* The type of identity that last modified the resource. Possible values include: 'User',
* 'Application', 'ManagedIdentity', 'Key'
*/
lastModifiedByType?: CreatedByType;
/**
* The type of identity that last modified the resource.
*/
lastModifiedAt?: Date;
}

/**
* ARM resource.
*/
Expand Down Expand Up @@ -56,6 +88,10 @@ export interface AgreementTerms extends Resource {
* Link to the privacy policy of the publisher.
*/
privacyPolicyLink?: string;
/**
* Link to HTML with Azure Marketplace terms.
*/
marketplaceTermsLink?: string;
/**
* Date and time in UTC of when the terms were accepted. This is empty if Accepted is false.
*/
Expand All @@ -68,6 +104,11 @@ export interface AgreementTerms extends Resource {
* If any version of the terms have been accepted, otherwise false.
*/
accepted?: boolean;
/**
* The system meta data relating to this resource.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly systemData?: SystemData;
}

/**
Expand Down Expand Up @@ -150,6 +191,14 @@ export interface OperationListResult extends Array<Operation> {
readonly nextLink?: string;
}

/**
* Defines values for CreatedByType.
* Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
* @readonly
* @enum {string}
*/
export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key';

/**
* Contains response data for the get operation.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand All @@ -12,6 +12,52 @@ import * as msRest from "@azure/ms-rest-js";
export const CloudError = CloudErrorMapper;
export const BaseResource = BaseResourceMapper;

export const SystemData: msRest.CompositeMapper = {
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData",
modelProperties: {
createdBy: {
serializedName: "createdBy",
type: {
name: "String"
}
},
createdByType: {
serializedName: "createdByType",
type: {
name: "String"
}
},
createdAt: {
serializedName: "createdAt",
type: {
name: "DateTime"
}
},
lastModifiedBy: {
serializedName: "lastModifiedBy",
type: {
name: "String"
}
},
lastModifiedByType: {
serializedName: "lastModifiedByType",
type: {
name: "String"
}
},
lastModifiedAt: {
serializedName: "lastModifiedAt",
type: {
name: "DateTime"
}
}
}
}
};

export const Resource: msRest.CompositeMapper = {
serializedName: "Resource",
type: {
Expand Down Expand Up @@ -80,6 +126,12 @@ export const AgreementTerms: msRest.CompositeMapper = {
name: "String"
}
},
marketplaceTermsLink: {
serializedName: "properties.marketplaceTermsLink",
type: {
name: "String"
}
},
retrieveDatetime: {
serializedName: "properties.retrieveDatetime",
type: {
Expand All @@ -97,6 +149,14 @@ export const AgreementTerms: msRest.CompositeMapper = {
type: {
name: "Boolean"
}
},
systemData: {
readOnly: true,
serializedName: "systemData",
type: {
name: "Composite",
className: "SystemData"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand All @@ -9,8 +9,8 @@
export {
AgreementTerms,
BaseResource,
CloudError,
ErrorResponse,
ErrorResponseError,
Resource
Resource,
SystemData
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -258,7 +257,7 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.AgreementTerms
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorResponse
}
},
serializer
Expand Down Expand Up @@ -370,7 +369,7 @@ const getAgreementOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.AgreementTerms
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorResponse
}
},
serializer
Expand Down Expand Up @@ -404,7 +403,7 @@ const listOperationSpec: msRest.OperationSpec = {
}
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.ErrorResponse
}
},
serializer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand Down

0 comments on commit 0e09777

Please sign in to comment.