Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR billing/resource-manager] Swagger for Tenant Properties API (Do #932

Closed
2 changes: 1 addition & 1 deletion packages/@azure/arm-billing/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
16 changes: 16 additions & 0 deletions packages/@azure/arm-billing/lib/models/discoverTenantsMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 {
DiscoverTenant,
ErrorResponse,
ErrorDetails
} from "../models/mappers";

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 {
DiscoverTenants,
ErrorResponse,
ErrorDetails
} from "../models/mappers";

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 {
TenantProperties,
ErrorResponse,
ErrorDetails
} from "../models/mappers";

81 changes: 81 additions & 0 deletions packages/@azure/arm-billing/lib/operations/discoverTenants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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 "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/discoverTenantsMappers";
import * as Parameters from "../models/parameters";
import { BillingManagementClientContext } from "../billingManagementClientContext";

/** Class representing a DiscoverTenants. */
export class DiscoverTenants {
private readonly client: BillingManagementClientContext;

/**
* Create a DiscoverTenants.
* @param {BillingManagementClientContext} client Reference to the service client.
*/
constructor(client: BillingManagementClientContext) {
this.client = client;
}

/**
* Gets a Tenant Properties.
* @param billingProfileId Billing Profile Id.
* @param [options] The optional parameters
* @returns Promise<Models.DiscoverTenantsGetResponse>
*/
get(billingProfileId: string, options?: msRest.RequestOptionsBase): Promise<Models.DiscoverTenantsGetResponse>;
/**
* @param billingProfileId Billing Profile Id.
* @param callback The callback
*/
get(billingProfileId: string, callback: msRest.ServiceCallback<Models.DiscoverTenant>): void;
/**
* @param billingProfileId Billing Profile Id.
* @param options The optional parameters
* @param callback The callback
*/
get(billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DiscoverTenant>): void;
get(billingProfileId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DiscoverTenant>): Promise<Models.DiscoverTenantsGetResponse> {
return this.client.sendOperationRequest(
{
billingProfileId,
options
},
getOperationSpec,
callback) as Promise<Models.DiscoverTenantsGetResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Billing/billingProfiles/{billingProfileId}/discoverTenants",
urlParameters: [
Parameters.billingProfileId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DiscoverTenant
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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 "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/discoverTenantsOperationsMappers";
import * as Parameters from "../models/parameters";
import { BillingManagementClientContext } from "../billingManagementClientContext";

/** Class representing a DiscoverTenantsOperations. */
export class DiscoverTenantsOperations {
private readonly client: BillingManagementClientContext;

/**
* Create a DiscoverTenantsOperations.
* @param {BillingManagementClientContext} client Reference to the service client.
*/
constructor(client: BillingManagementClientContext) {
this.client = client;
}

/**
* Gets a Tenant Properties.
* @param billingProfileId Billing Profile Id.
* @param [options] The optional parameters
* @returns Promise<Models.DiscoverTenantsGetResponse>
*/
get(billingProfileId: string, options?: msRest.RequestOptionsBase): Promise<Models.DiscoverTenantsGetResponse>;
/**
* @param billingProfileId Billing Profile Id.
* @param callback The callback
*/
get(billingProfileId: string, callback: msRest.ServiceCallback<Models.DiscoverTenants>): void;
/**
* @param billingProfileId Billing Profile Id.
* @param options The optional parameters
* @param callback The callback
*/
get(billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DiscoverTenants>): void;
get(billingProfileId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.DiscoverTenants>): Promise<Models.DiscoverTenantsGetResponse> {
return this.client.sendOperationRequest(
{
billingProfileId,
options
},
getOperationSpec,
callback) as Promise<Models.DiscoverTenantsGetResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Billing/discoverTenants",
urlParameters: [
Parameters.billingProfileId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.DiscoverTenants
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* 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 "ms-rest-js";
import * as Models from "../models";
import * as Mappers from "../models/tenantPropertiesOperationsMappers";
import * as Parameters from "../models/parameters";
import { BillingManagementClientContext } from "../billingManagementClientContext";

/** Class representing a TenantPropertiesOperations. */
export class TenantPropertiesOperations {
private readonly client: BillingManagementClientContext;

/**
* Create a TenantPropertiesOperations.
* @param {BillingManagementClientContext} client Reference to the service client.
*/
constructor(client: BillingManagementClientContext) {
this.client = client;
}

/**
* Gets a Tenant Properties.
* @param billingProfileId Billing Profile Id.
* @param [options] The optional parameters
* @returns Promise<Models.TenantPropertiesGetResponse>
*/
get(billingProfileId: string, options?: msRest.RequestOptionsBase): Promise<Models.TenantPropertiesGetResponse>;
/**
* @param billingProfileId Billing Profile Id.
* @param callback The callback
*/
get(billingProfileId: string, callback: msRest.ServiceCallback<Models.TenantProperties>): void;
/**
* @param billingProfileId Billing Profile Id.
* @param options The optional parameters
* @param callback The callback
*/
get(billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TenantProperties>): void;
get(billingProfileId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback<Models.TenantProperties>): Promise<Models.TenantPropertiesGetResponse> {
return this.client.sendOperationRequest(
{
billingProfileId,
options
},
getOperationSpec,
callback) as Promise<Models.TenantPropertiesGetResponse>;
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Billing/discoverTenants",
urlParameters: [
Parameters.billingProfileId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.TenantProperties
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
70 changes: 35 additions & 35 deletions packages/@azure/arm-consumption/.npmignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
#git
.git
.gitignore
#gulp
gulpfile.js
#documentation
doc/
docs/
#dependencies
node_modules/
#samples
sample/
samples/
#tests
test/
tests/
coverage/
#tools and scripts
tools/
scripts/
#IDE settings
*.sln
.vscode/
.idea
.editorconfig
.ntvs_analysis.*
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
appveyor.yml
# Nuget packages #
.nuget/
packages/
packages.config
#git
.git
.gitignore
#gulp
gulpfile.js
#documentation
doc/
docs/
#dependencies
node_modules/
#samples
sample/
samples/
#tests
test/
tests/
coverage/
#tools and scripts
tools/
scripts/
#IDE settings
*.sln
.vscode/
.idea
.editorconfig
.ntvs_analysis.*
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
appveyor.yml
# Nuget packages #
.nuget/
packages/
packages.config
Loading