diff --git a/src/SDKs/Billing/AzSdk.RP.props b/src/SDKs/Billing/AzSdk.RP.props new file mode 100644 index 000000000000..26ad7d93c996 --- /dev/null +++ b/src/SDKs/Billing/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + Billing_2018-03-01-preview; + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/src/SDKs/Billing/Billing.Tests/Billing.Tests.csproj b/src/SDKs/Billing/Billing.Tests/Billing.Tests.csproj index 03624ca860f1..962286ff3ccd 100644 --- a/src/SDKs/Billing/Billing.Tests/Billing.Tests.csproj +++ b/src/SDKs/Billing/Billing.Tests/Billing.Tests.csproj @@ -5,7 +5,7 @@ Billing.Tests Class Library Microsoft Corporation Billing.Tests - 2.0.0-preview + 2.0.0 diff --git a/src/SDKs/Billing/Billing.Tests/ScenarioTests/EnrollmentAccountTests.cs b/src/SDKs/Billing/Billing.Tests/ScenarioTests/EnrollmentAccountTests.cs new file mode 100644 index 000000000000..6bae6c9bf728 --- /dev/null +++ b/src/SDKs/Billing/Billing.Tests/ScenarioTests/EnrollmentAccountTests.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Billing.Tests.Helpers; +using Microsoft.Azure.Management.Billing; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using Xunit; + +namespace Billing.Tests.ScenarioTests +{ + public class EnrollmentAccountTests : TestBase + { + const string EnrollmentAccountName = "c8a9f59a-2d9b-4086-91c8-8988cae3bec3"; + + [Fact] + public void ListEnrollmentAccounts() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var billingMgmtClient = BillingTestUtilities.GetBillingManagementClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + var enrollmentAccounts = billingMgmtClient.EnrollmentAccounts.List().Value; + Assert.NotNull(enrollmentAccounts); + Assert.True(enrollmentAccounts.Any()); + } + } + + [Fact] + public void GetEnrollmentAccountWithName() + { + HttpMockServer.RecordsDirectory = GetSessionsDirectoryPath(); + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var billingMgmtClient = BillingTestUtilities.GetBillingManagementClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); + var enrollmentAccount = billingMgmtClient.EnrollmentAccounts.Get(EnrollmentAccountName); + Assert.NotNull(enrollmentAccount); + Assert.Equal(EnrollmentAccountName, enrollmentAccount.Name); + Assert.NotNull(enrollmentAccount.Name); + Assert.NotNull(enrollmentAccount.PrincipalName); + } + } + + private static string GetSessionsDirectoryPath() + { + string executingAssemblyPath = typeof(Billing.Tests.ScenarioTests.EnrollmentAccountTests).GetTypeInfo().Assembly.Location; + return Path.Combine(Path.GetDirectoryName(executingAssemblyPath), "SessionRecords"); + } + } +} diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodWithName.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodWithName.json index b28fbfc2a913..025422a19430 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodWithName.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodWithName.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201705-1?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcy8yMDE3MDUtMT9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXc=", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201705-1?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcy8yMDE3MDUtMT9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodsNoResult.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodsNoResult.json index 8eb1dfdff2ee..1681029937e8 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodsNoResult.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/GetBillingPeriodsNoResult.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2017-04-24-preview&$filter=billingPeriodEndDate%20lt%202017-01-01&$top=1", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXcmJGZpbHRlcj1iaWxsaW5nUGVyaW9kRW5kRGF0ZSUyMGx0JTIwMjAxNy0wMS0wMSYkdG9wPTE=", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2018-03-01-preview&$filter=billingPeriodEndDate%20lt%202017-01-01&$top=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXcmJGZpbHRlcj1iaWxsaW5nUGVyaW9kRW5kRGF0ZSUyMGx0JTIwMjAxNy0wMS0wMSYkdG9wPTE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -17,7 +17,7 @@ "Microsoft.Azure.Management.Billing.BillingManagementClient/1.2.0-preview" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"target\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2017-04-24-preview&$filter=billingPeriodEndDate%20lt%202017-01-01&$top=1\",\r\n \"message\": \"Could not find billing period for the subscription.\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"target\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2018-03-01-preview&$filter=billingPeriodEndDate%20lt%202017-01-01&$top=1\",\r\n \"message\": \"Could not find billing period for the subscription.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "332" diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsTest.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsTest.json index a789f23aa439..c00176bd9137 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsTest.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsTest.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXc=", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsWithQueryParametersTest.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsWithQueryParametersTest.json index 53c4e0574b48..8aa41ebd87f9 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsWithQueryParametersTest.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.BillingPeriodsTests/ListBillingPeriodsWithQueryParametersTest.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2017-04-24-preview&$filter=billingPeriodEndDate%20gt%202017-01-31&$top=1", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXcmJGZpbHRlcj1iaWxsaW5nUGVyaW9kRW5kRGF0ZSUyMGd0JTIwMjAxNy0wMS0zMSYkdG9wPTE=", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2018-03-01-preview&$filter=billingPeriodEndDate%20gt%202017-01-31&$top=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9iaWxsaW5nUGVyaW9kcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXcmJGZpbHRlcj1iaWxsaW5nUGVyaW9kRW5kRGF0ZSUyMGd0JTIwMjAxNy0wMS0zMSYkdG9wPTE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -17,7 +17,7 @@ "Microsoft.Azure.Management.Billing.BillingManagementClient/1.2.0-preview" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201706-1\",\r\n \"type\": \"Microsoft.Billing/billingPeriods\",\r\n \"name\": \"201706-1\",\r\n \"properties\": {\r\n \"billingPeriodStartDate\": \"2017-04-10\",\r\n \"billingPeriodEndDate\": \"2017-05-09\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2017-04-24-preview&$filter=billingPeriodEndDate%20gt%202017-01-31&$top=1&$skiptoken=MQ%3D%3D\"\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201706-1\",\r\n \"type\": \"Microsoft.Billing/billingPeriods\",\r\n \"name\": \"201706-1\",\r\n \"properties\": {\r\n \"billingPeriodStartDate\": \"2017-04-10\",\r\n \"billingPeriodEndDate\": \"2017-05-09\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods?api-version=2018-03-01-preview&$filter=billingPeriodEndDate%20gt%202017-01-31&$top=1&$skiptoken=MQ%3D%3D\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/GetEnrollmentAccountWithName.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/GetEnrollmentAccountWithName.json new file mode 100644 index 000000000000..2480facb86e3 --- /dev/null +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/GetEnrollmentAccountWithName.json @@ -0,0 +1,81 @@ +{ + "Entries": [ + { + "RequestUri": "/providers/Microsoft.Billing/enrollmentAccounts/c8a9f59a-2d9b-4086-91c8-8988cae3bec3?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHMvYzhhOWY1OWEtMmQ5Yi00MDg2LTkxYzgtODk4OGNhZTNiZWMzP2FwaS12ZXJzaW9uPTIwMTgtMDMtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eafff9da-749e-48e4-a6d7-07f09324c9f6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Billing.BillingManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/providers/Microsoft.Billing/enrollmentAccounts/c8a9f59a-2d9b-4086-91c8-8988cae3bec3\",\r\n \"name\": \"c8a9f59a-2d9b-4086-91c8-8988cae3bec3\",\r\n \"properties\": {\r\n \"principalName\": \"JoeSchmoe@contoso.onmicrosoft.com\",\r\n \"offerTypes\": [\r\n \"MS-AZR-0017P\",\r\n \"MS-AZR-0025P\",\r\n \"MS-AZR-0148P\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Billing/enrollmentAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 20 Mar 2018 23:49:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "api-supported-versions": [ + "2018-03-01-preview" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "14997" + ], + "x-ms-request-id": [ + "98e9ab6a-9814-4dc5-bbd9-f2adee071009" + ], + "x-ms-correlation-request-id": [ + "98e9ab6a-9814-4dc5-bbd9-f2adee071009" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180320T234918Z:98e9ab6a-9814-4dc5-bbd9-f2adee071009" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "e67eab5a-bc80-4e7f-9c9f-2228d76575a4" + } +} \ No newline at end of file diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/ListEnrollmentAccounts.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/ListEnrollmentAccounts.json new file mode 100644 index 000000000000..a716f5b46e49 --- /dev/null +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.EnrollmentAccountTests/ListEnrollmentAccounts.json @@ -0,0 +1,81 @@ +{ + "Entries": [ + { + "RequestUri": "/providers/Microsoft.Billing/enrollmentAccounts?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9lbnJvbGxtZW50QWNjb3VudHM/YXBpLXZlcnNpb249MjAxOC0wMy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4e688485-4104-43db-9967-494e3caca686" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25211.01", + "Microsoft.Azure.Management.Billing.BillingManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/providers/Microsoft.Billing/enrollmentAccounts/a5a1de67-85ef-4082-b274-44a264fc4fee\",\r\n \"name\": \"a5a1de67-85ef-4082-b274-44a264fc4fee\",\r\n \"properties\": {\r\n \"principalName\": \"JoeSchmoe@contoso.onmicrosoft.com\",\r\n \"offerTypes\": [\r\n \"MS-AZR-0017P\",\r\n \"MS-AZR-0025P\",\r\n \"MS-AZR-0148P\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Billing/enrollmentAccounts\"\r\n },\r\n {\r\n \"id\": \"/providers/Microsoft.Billing/enrollmentAccounts/14522963-9fac-4453-9a4b-c9c57217a78f\",\r\n \"name\": \"14522963-9fac-4453-9a4b-c9c57217a78f\",\r\n \"properties\": {\r\n \"principalName\": \"JoeSchmoe@contoso.onmicrosoft.com\",\r\n \"offerTypes\": [\r\n \"MS-AZR-0017P\",\r\n \"MS-AZR-0025P\",\r\n \"MS-AZR-0148P\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Billing/enrollmentAccounts\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 20 Mar 2018 23:48:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "api-supported-versions": [ + "2018-03-01-preview" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "14995" + ], + "x-ms-request-id": [ + "b8ff92c7-052e-47f2-b9ea-f332290e2895" + ], + "x-ms-correlation-request-id": [ + "b8ff92c7-052e-47f2-b9ea-f332290e2895" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20180320T234841Z:b8ff92c7-052e-47f2-b9ea-f332290e2895" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "e67eab5a-bc80-4e7f-9c9f-2228d76575a4" + } +} \ No newline at end of file diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoiceWithName.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoiceWithName.json index fda343f40bb4..bcff9b9372c8 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoiceWithName.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoiceWithName.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/201705-217994100075389?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcy8yMDE3MDUtMjE3OTk0MTAwMDc1Mzg5P2FwaS12ZXJzaW9uPTIwMTctMDQtMjQtcHJldmlldw==", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/201705-217994100075389?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcy8yMDE3MDUtMjE3OTk0MTAwMDc1Mzg5P2FwaS12ZXJzaW9uPTIwMTgtMDMtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoicesNoResult.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoicesNoResult.json index 221b3c4f4da8..633e62ad2b96 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoicesNoResult.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetInvoicesNoResult.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2017-04-24-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20lt%202016-01-31&$top=1", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXcmJGV4cGFuZD1kb3dubG9hZFVybCYkZmlsdGVyPWludm9pY2VQZXJpb2RFbmREYXRlJTIwbHQlMjAyMDE2LTAxLTMxJiR0b3A9MQ==", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2018-03-01-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20lt%202016-01-31&$top=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXcmJGV4cGFuZD1kb3dubG9hZFVybCYkZmlsdGVyPWludm9pY2VQZXJpb2RFbmREYXRlJTIwbHQlMjAyMDE2LTAxLTMxJiR0b3A9MQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -17,7 +17,7 @@ "Microsoft.Azure.Management.Billing.BillingManagementClient/1.2.0-preview" ] }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"target\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2017-04-24-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20lt%202016-01-31&$top=1\",\r\n \"message\": \"Could not find invoice for the subscription.\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"target\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2018-03-01-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20lt%202016-01-31&$top=1\",\r\n \"message\": \"Could not find invoice for the subscription.\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "339" diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetLatestInvoice.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetLatestInvoice.json index b88cbee06e8a..d87d8aa405ef 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetLatestInvoice.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/GetLatestInvoice.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/latest?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcy9sYXRlc3Q/YXBpLXZlcnNpb249MjAxNy0wNC0yNC1wcmV2aWV3", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/latest?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcy9sYXRlc3Q/YXBpLXZlcnNpb249MjAxOC0wMy0wMS1wcmV2aWV3", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesTest.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesTest.json index 6d27d7cea7a2..6780a64dae6d 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesTest.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesTest.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXc=", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXc=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesWithQueryParametersTest.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesWithQueryParametersTest.json index 956623704efd..bdc25dcb9f0f 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesWithQueryParametersTest.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.InvoicesTests/ListInvoicesWithQueryParametersTest.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2017-04-24-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20ge%202017-01-31%20and%20invoicePeriodEndDate%20le%202017-02-28&$top=1", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE3LTA0LTI0LXByZXZpZXcmJGV4cGFuZD1kb3dubG9hZFVybCYkZmlsdGVyPWludm9pY2VQZXJpb2RFbmREYXRlJTIwZ2UlMjAyMDE3LTAxLTMxJTIwYW5kJTIwaW52b2ljZVBlcmlvZEVuZERhdGUlMjBsZSUyMDIwMTctMDItMjgmJHRvcD0x", + "RequestUri": "/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2018-03-01-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20ge%202017-01-31%20and%20invoicePeriodEndDate%20le%202017-02-28&$top=1", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDM0N2Q2M2EtNDIxYS00M2E3LTgzNmEtNWYzODljNzljZDA3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9pbnZvaWNlcz9hcGktdmVyc2lvbj0yMDE4LTAzLTAxLXByZXZpZXcmJGV4cGFuZD1kb3dubG9hZFVybCYkZmlsdGVyPWludm9pY2VQZXJpb2RFbmREYXRlJTIwZ2UlMjAyMDE3LTAxLTMxJTIwYW5kJTIwaW52b2ljZVBlcmlvZEVuZERhdGUlMjBsZSUyMDIwMTctMDItMjgmJHRvcD0x", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { @@ -17,7 +17,7 @@ "Microsoft.Azure.Management.Billing.BillingManagementClient/1.2.0-preview" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/201703-117646100066812\",\r\n \"type\": \"Microsoft.Billing/invoices\",\r\n \"name\": \"201703-117646100066812\",\r\n \"properties\": {\r\n \"downloadUrl\": {\r\n \"expiryTime\": \"2017-04-20T23:33:12Z\",\r\n \"url\": \"https://billinginsightsstoretest.blob.core.windows.net/invoices/0347d63a-421a-43a7-836a-5f389c79cd07-201703-117646100066812.pdf?sv=2014-02-14&sr=b&sig=q2y559I2eCY0Iisyh5ZQ%2BGmymcCZqkpR2hTZ55M%2Bb0M%3D&se=2017-04-20T23%3A33%3A12Z&sp=r\"\r\n },\r\n \"invoicePeriodEndDate\": \"2017-02-09\",\r\n \"invoicePeriodStartDate\": \"2017-01-10\",\r\n \"billingPeriodIds\": [\r\n \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201703-1\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2017-04-24-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20ge%202017-01-31%20and%20invoicePeriodEndDate%20le%202017-02-28&$top=1&$skiptoken=%23%231!8!OEY1MEY-%23%231!80!MDM0N0Q2M0EtNDIxQS00M0E3LTgzNkEtNUYzODlDNzlDRDA3Xzc5ODIxMC0xMTc3MzMxMzAwNjEyNzU-%23%23\"\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices/201703-117646100066812\",\r\n \"type\": \"Microsoft.Billing/invoices\",\r\n \"name\": \"201703-117646100066812\",\r\n \"properties\": {\r\n \"downloadUrl\": {\r\n \"expiryTime\": \"2017-04-20T23:33:12Z\",\r\n \"url\": \"https://billinginsightsstoretest.blob.core.windows.net/invoices/0347d63a-421a-43a7-836a-5f389c79cd07-201703-117646100066812.pdf?sv=2014-02-14&sr=b&sig=q2y559I2eCY0Iisyh5ZQ%2BGmymcCZqkpR2hTZ55M%2Bb0M%3D&se=2017-04-20T23%3A33%3A12Z&sp=r\"\r\n },\r\n \"invoicePeriodEndDate\": \"2017-02-09\",\r\n \"invoicePeriodStartDate\": \"2017-01-10\",\r\n \"billingPeriodIds\": [\r\n \"/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/billingPeriods/201703-1\"\r\n ]\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://billing-preview.windowsazure.com/subscriptions/0347d63a-421a-43a7-836a-5f389c79cd07/providers/Microsoft.Billing/invoices?api-version=2018-03-01-preview&$expand=downloadUrl&$filter=invoicePeriodEndDate%20ge%202017-01-31%20and%20invoicePeriodEndDate%20le%202017-02-28&$top=1&$skiptoken=%23%231!8!OEY1MEY-%23%231!80!MDM0N0Q2M0EtNDIxQS00M0E3LTgzNkEtNUYzODlDNzlDRDA3Xzc5ODIxMC0xMTc3MzMxMzAwNjEyNzU-%23%23\"\r\n}", "ResponseHeaders": { "Content-Type": [ "application/json; charset=utf-8" diff --git a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.OperationsTests/ListOperationsTest.json b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.OperationsTests/ListOperationsTest.json index 99a97a58ee1e..c6004b0a5484 100644 --- a/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.OperationsTests/ListOperationsTest.json +++ b/src/SDKs/Billing/Billing.Tests/SessionRecords/Billing.Tests.ScenarioTests.OperationsTests/ListOperationsTest.json @@ -1,8 +1,8 @@ { "Entries": [ { - "RequestUri": "/providers/Microsoft.Billing/operations?api-version=2017-04-24-preview", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTctMDQtMjQtcHJldmlldw==", + "RequestUri": "/providers/Microsoft.Billing/operations?api-version=2018-03-01-preview", + "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQmlsbGluZy9vcGVyYXRpb25zP2FwaS12ZXJzaW9uPTIwMTgtMDMtMDEtcHJldmlldw==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs index 0c645a8e1b37..c526acc2501b 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingManagementClient.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; @@ -23,9 +23,7 @@ namespace Microsoft.Azure.Management.Billing /// /// Billing client provides access to billing resources for Azure - /// Web-Direct subscriptions. Other subscription types which were not - /// purchased directly through the Azure web portal are not supported - /// through this preview API. + /// subscriptions. /// public partial class BillingManagementClient : ServiceClient, IBillingManagementClient, IAzureClient { @@ -51,7 +49,7 @@ public partial class BillingManagementClient : ServiceClient /// Version of the API to be used with the client request. The current version - /// is 2017-04-24-preview. + /// is 2018-03-01-preview. /// public string ApiVersion { get; private set; } @@ -77,6 +75,11 @@ public partial class BillingManagementClient : ServiceClient public bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IEnrollmentAccountsOperations. + /// + public virtual IEnrollmentAccountsOperations EnrollmentAccounts { get; private set; } + /// /// Gets the IBillingPeriodsOperations. /// @@ -293,11 +296,12 @@ public BillingManagementClient(System.Uri baseUri, ServiceClientCredentials cred /// private void Initialize() { + EnrollmentAccounts = new EnrollmentAccountsOperations(this); BillingPeriods = new BillingPeriodsOperations(this); Invoices = new InvoicesOperations(this); Operations = new Operations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2017-04-24-preview"; + ApiVersion = "2018-03-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperations.cs index 92bb0afc9ec9..12233147f28f 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -52,7 +52,9 @@ internal BillingPeriodsOperations(BillingManagementClient client) /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// @@ -264,7 +266,9 @@ internal BillingPeriodsOperations(BillingManagementClient client) } /// - /// Gets a named billing period. + /// Gets a named billing period. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// The name of a BillingPeriod resource. @@ -447,7 +451,9 @@ internal BillingPeriodsOperations(BillingManagementClient client) /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperationsExtensions.cs index 5250722556f0..4760a7e2bf18 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperationsExtensions.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/BillingPeriodsOperationsExtensions.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -23,7 +23,9 @@ public static partial class BillingPeriodsOperationsExtensions { /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// @@ -51,7 +53,9 @@ public static partial class BillingPeriodsOperationsExtensions /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// @@ -84,7 +88,9 @@ public static partial class BillingPeriodsOperationsExtensions } /// - /// Gets a named billing period. + /// Gets a named billing period. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// The operations group for this extension method. @@ -98,7 +104,9 @@ public static BillingPeriod Get(this IBillingPeriodsOperations operations, strin } /// - /// Gets a named billing period. + /// Gets a named billing period. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// The operations group for this extension method. @@ -119,7 +127,9 @@ public static BillingPeriod Get(this IBillingPeriodsOperations operations, strin /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// @@ -135,7 +145,9 @@ public static IPage ListNext(this IBillingPeriodsOperations opera /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased directly + /// through the Azure web portal are not supported through this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperations.cs new file mode 100644 index 000000000000..db37ea348556 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperations.cs @@ -0,0 +1,399 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.Billing +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// EnrollmentAccountsOperations operations. + /// + internal partial class EnrollmentAccountsOperations : IServiceOperations, IEnrollmentAccountsOperations + { + /// + /// Initializes a new instance of the EnrollmentAccountsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal EnrollmentAccountsOperations(BillingManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the BillingManagementClient + /// + public BillingManagementClient Client { get; private set; } + + /// + /// Lists the enrollment accounts the caller has access to. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/enrollmentAccounts").ToString(); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a enrollment account by name. + /// + /// + /// Enrollment Account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Billing/enrollmentAccounts/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperationsExtensions.cs new file mode 100644 index 000000000000..5e238bded107 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/EnrollmentAccountsOperationsExtensions.cs @@ -0,0 +1,87 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.Billing +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for EnrollmentAccountsOperations. + /// + public static partial class EnrollmentAccountsOperationsExtensions + { + /// + /// Lists the enrollment accounts the caller has access to. + /// + /// + /// The operations group for this extension method. + /// + public static EnrollmentAccountListResult List(this IEnrollmentAccountsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists the enrollment accounts the caller has access to. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IEnrollmentAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a enrollment account by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Enrollment Account name. + /// + public static EnrollmentAccount Get(this IEnrollmentAccountsOperations operations, string name) + { + return operations.GetAsync(name).GetAwaiter().GetResult(); + } + + /// + /// Gets a enrollment account by name. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Enrollment Account name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IEnrollmentAccountsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs index 95bf27776296..910046ba2abb 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IBillingManagementClient.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -17,9 +17,7 @@ namespace Microsoft.Azure.Management.Billing /// /// Billing client provides access to billing resources for Azure - /// Web-Direct subscriptions. Other subscription types which were not - /// purchased directly through the Azure web portal are not supported - /// through this preview API. + /// subscriptions. /// public partial interface IBillingManagementClient : System.IDisposable { @@ -45,7 +43,7 @@ public partial interface IBillingManagementClient : System.IDisposable /// /// Version of the API to be used with the client request. The current - /// version is 2017-04-24-preview. + /// version is 2018-03-01-preview. /// string ApiVersion { get; } @@ -72,6 +70,11 @@ public partial interface IBillingManagementClient : System.IDisposable bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IEnrollmentAccountsOperations. + /// + IEnrollmentAccountsOperations EnrollmentAccounts { get; } + /// /// Gets the IBillingPeriodsOperations. /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/IBillingPeriodsOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IBillingPeriodsOperations.cs index 6ccb45c4b118..b606dde0bd03 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IBillingPeriodsOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IBillingPeriodsOperations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -25,7 +25,10 @@ public partial interface IBillingPeriodsOperations { /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased + /// directly through the Azure web portal are not supported through + /// this preview API. /// /// /// @@ -60,7 +63,10 @@ public partial interface IBillingPeriodsOperations /// Task>> ListWithHttpMessagesAsync(string filter = default(string), string skiptoken = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Gets a named billing period. + /// Gets a named billing period. This is only supported for Azure + /// Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported + /// through this preview API. /// /// /// The name of a BillingPeriod resource. @@ -83,7 +89,10 @@ public partial interface IBillingPeriodsOperations Task> GetWithHttpMessagesAsync(string billingPeriodName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists the available billing periods for a subscription in reverse - /// chronological order. + /// chronological order. This is only supported for Azure Web-Direct + /// subscriptions. Other subscription types which were not purchased + /// directly through the Azure web portal are not supported through + /// this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/IEnrollmentAccountsOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IEnrollmentAccountsOperations.cs new file mode 100644 index 000000000000..b7d15a9b64f7 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/IEnrollmentAccountsOperations.cs @@ -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. +// + +namespace Microsoft.Azure.Management.Billing +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// EnrollmentAccountsOperations operations. + /// + public partial interface IEnrollmentAccountsOperations + { + /// + /// Lists the enrollment accounts the caller has access to. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a enrollment account by name. + /// + /// + /// Enrollment Account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/IInvoicesOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IInvoicesOperations.cs index 09eed9e4a778..16f3594df09f 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IInvoicesOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IInvoicesOperations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -27,7 +27,10 @@ public partial interface IInvoicesOperations /// Lists the available invoices for a subscription in reverse /// chronological order beginning with the most recent invoice. In /// preview, invoices are available via this API only for invoice - /// periods which end December 1, 2016 or later. + /// periods which end December 1, 2016 or later. This is only + /// supported for Azure Web-Direct subscriptions. Other subscription + /// types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// @@ -69,7 +72,10 @@ public partial interface IInvoicesOperations Task>> ListWithHttpMessagesAsync(string expand = default(string), string filter = default(string), string skiptoken = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a named invoice resource. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only + /// supported for Azure Web-Direct subscriptions. Other subscription + /// types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// The name of an invoice resource. @@ -92,7 +98,10 @@ public partial interface IInvoicesOperations Task> GetWithHttpMessagesAsync(string invoiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the most recent invoice. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only + /// supported for Azure Web-Direct subscriptions. Other subscription + /// types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// The headers that will be added to request. @@ -114,7 +123,10 @@ public partial interface IInvoicesOperations /// Lists the available invoices for a subscription in reverse /// chronological order beginning with the most recent invoice. In /// preview, invoices are available via this API only for invoice - /// periods which end December 1, 2016 or later. + /// periods which end December 1, 2016 or later. This is only + /// supported for Azure Web-Direct subscriptions. Other subscription + /// types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/IOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/IOperations.cs index f78eb4adddd7..7bbaf066eb9a 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/IOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/IOperations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperations.cs b/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperations.cs index 243bda172de4..5d335d270df5 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -54,7 +54,9 @@ internal InvoicesOperations(BillingManagementClient client) /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// @@ -276,7 +278,10 @@ internal InvoicesOperations(BillingManagementClient client) /// /// Gets a named invoice resource. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// The name of an invoice resource. @@ -459,7 +464,10 @@ internal InvoicesOperations(BillingManagementClient client) /// /// Gets the most recent invoice. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// Headers that will be added to request. @@ -635,7 +643,9 @@ internal InvoicesOperations(BillingManagementClient client) /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperationsExtensions.cs index f2570aae5c79..d68bed12cbd7 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperationsExtensions.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/InvoicesOperationsExtensions.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -25,7 +25,9 @@ public static partial class InvoicesOperationsExtensions /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// @@ -59,7 +61,9 @@ public static partial class InvoicesOperationsExtensions /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// @@ -97,7 +101,10 @@ public static partial class InvoicesOperationsExtensions /// /// Gets a named invoice resource. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// The operations group for this extension method. @@ -112,7 +119,10 @@ public static Invoice Get(this IInvoicesOperations operations, string invoiceNam /// /// Gets a named invoice resource. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// The operations group for this extension method. @@ -133,7 +143,10 @@ public static Invoice Get(this IInvoicesOperations operations, string invoiceNam /// /// Gets the most recent invoice. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// The operations group for this extension method. @@ -145,7 +158,10 @@ public static Invoice GetLatest(this IInvoicesOperations operations) /// /// Gets the most recent invoice. When getting a single invoice, the - /// downloadUrl property is expanded automatically. + /// downloadUrl property is expanded automatically. This is only supported for + /// Azure Web-Direct subscriptions. Other subscription types which were not + /// purchased directly through the Azure web portal are not supported through + /// this preview API. /// /// /// The operations group for this extension method. @@ -165,7 +181,9 @@ public static Invoice GetLatest(this IInvoicesOperations operations) /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// @@ -183,7 +201,9 @@ public static IPage ListNext(this IInvoicesOperations operations, strin /// Lists the available invoices for a subscription in reverse chronological /// order beginning with the most recent invoice. In preview, invoices are /// available via this API only for invoice periods which end December 1, 2016 - /// or later. + /// or later. This is only supported for Azure Web-Direct subscriptions. Other + /// subscription types which were not purchased directly through the Azure web + /// portal are not supported through this preview API. /// /// /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/BillingPeriod.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/BillingPeriod.cs index 0d239b661bf0..44b106188649 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/BillingPeriod.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/BillingPeriod.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; @@ -29,7 +28,7 @@ public partial class BillingPeriod : Resource /// public BillingPeriod() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/DownloadUrl.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/DownloadUrl.cs index e489b83343a2..7a461f68e6dc 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/DownloadUrl.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/DownloadUrl.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Newtonsoft.Json; using System.Linq; @@ -25,7 +24,7 @@ public partial class DownloadUrl /// public DownloadUrl() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccount.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccount.cs new file mode 100644 index 000000000000..b8471522516f --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccount.cs @@ -0,0 +1,59 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.Billing.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An enrollment account resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class EnrollmentAccount : Resource + { + /// + /// Initializes a new instance of the EnrollmentAccount class. + /// + public EnrollmentAccount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnrollmentAccount class. + /// + /// Resource Id. + /// Resource name. + /// Resource type. + /// The account owner's principal + /// name. + public EnrollmentAccount(string id = default(string), string name = default(string), string type = default(string), string principalName = default(string)) + : base(id, name, type) + { + PrincipalName = principalName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the account owner's principal name. + /// + [JsonProperty(PropertyName = "properties.principalName")] + public string PrincipalName { get; private set; } + + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccountListResult.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccountListResult.cs new file mode 100644 index 000000000000..6f15df453de9 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/EnrollmentAccountListResult.cs @@ -0,0 +1,64 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.Billing.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Result of listing enrollment accounts. + /// + public partial class EnrollmentAccountListResult + { + /// + /// Initializes a new instance of the EnrollmentAccountListResult + /// class. + /// + public EnrollmentAccountListResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnrollmentAccountListResult + /// class. + /// + /// The list of enrollment accounts. + /// The link (url) to the next page of + /// results. + public EnrollmentAccountListResult(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the list of enrollment accounts. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; private set; } + + /// + /// Gets the link (url) to the next page of results. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; private set; } + + } +} diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorDetails.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorDetails.cs index 2a5488b13c1c..2abc90d1ef82 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorDetails.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorDetails.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Newtonsoft.Json; using System.Linq; @@ -24,7 +23,7 @@ public partial class ErrorDetails /// public ErrorDetails() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponse.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponse.cs index a267f6597f01..6c39de5c6789 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponse.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponse.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Newtonsoft.Json; using System.Linq; @@ -25,7 +24,7 @@ public partial class ErrorResponse /// public ErrorResponse() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponseException.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponseException.cs index 4fdd2bc8b3c8..9d05048b6e32 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponseException.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/ErrorResponseException.cs @@ -1,26 +1,22 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Microsoft.Rest; /// /// Exception thrown for an invalid response with ErrorResponse /// information. /// -#if LEGACY - [System.Serializable] -#endif - public class ErrorResponseException : RestException + public partial class ErrorResponseException : RestException { /// /// Gets information about the associated HTTP request. @@ -62,39 +58,5 @@ public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } - -#if LEGACY - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - /// Serialization info. - /// Streaming context. - protected ErrorResponseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - : base(info, context) - { - } - - /// - /// Serializes content of the exception. - /// - /// Serialization info. - /// Streaming context. - /// - /// Thrown when a required parameter is null - /// - [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - { - base.GetObjectData(info, context); - if (info == null) - { - throw new System.ArgumentNullException("info"); - } - - info.AddValue("Request", Request); - info.AddValue("Response", Response); - info.AddValue("Body", Body); - } -#endif } } diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/Invoice.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/Invoice.cs index fd3b8fab61e6..ab53d31feb19 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/Invoice.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/Invoice.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; @@ -29,7 +28,7 @@ public partial class Invoice : Resource /// public Invoice() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/Operation.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/Operation.cs index 1965ba75c74e..20cb7d5af963 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/Operation.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/Operation.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Newtonsoft.Json; using System.Linq; @@ -24,7 +23,7 @@ public partial class Operation /// public Operation() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/OperationDisplay.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/OperationDisplay.cs index 72f78f703a94..41b4803e19ca 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/OperationDisplay.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/OperationDisplay.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Newtonsoft.Json; using System.Linq; @@ -24,7 +23,7 @@ public partial class OperationDisplay /// public OperationDisplay() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/Page.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/Page.cs index 0f231f19e366..5f9ef03c16c2 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/Page.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/Page.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; diff --git a/src/SDKs/Billing/Management.Billing/Generated/Models/Resource.cs b/src/SDKs/Billing/Management.Billing/Generated/Models/Resource.cs index 38caf23675f0..b545457eeb34 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Models/Resource.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Models/Resource.cs @@ -1,16 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.Billing; using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; @@ -26,7 +25,7 @@ public partial class Resource : IResource /// public Resource() { - CustomInit(); + CustomInit(); } /// diff --git a/src/SDKs/Billing/Management.Billing/Generated/Operations.cs b/src/SDKs/Billing/Management.Billing/Generated/Operations.cs index 608e8b84e0d2..45722dc878eb 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/Operations.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/Operations.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/src/SDKs/Billing/Management.Billing/Generated/OperationsExtensions.cs b/src/SDKs/Billing/Management.Billing/Generated/OperationsExtensions.cs index 15674a08f26b..b9095e5290b6 100644 --- a/src/SDKs/Billing/Management.Billing/Generated/OperationsExtensions.cs +++ b/src/SDKs/Billing/Management.Billing/Generated/OperationsExtensions.cs @@ -1,15 +1,15 @@ +// // 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 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.Billing { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs new file mode 100644 index 000000000000..7ac287f9db98 --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/Generated/SdkInfo_BillingManagementClient.cs @@ -0,0 +1,21 @@ + +using System; +using System.Collections.Generic; +using System.Linq; + +internal static partial class SdkInfo +{ + public static IEnumerable> ApiInfo_BillingManagementClient + { + get + { + return new Tuple[] + { + new Tuple("Billing", "BillingPeriods", "2018-03-01-preview"), + new Tuple("Billing", "EnrollmentAccounts", "2018-03-01-preview"), + new Tuple("Billing", "Invoices", "2018-03-01-preview"), + new Tuple("Billing", "Operations", "2018-03-01-preview"), + }.AsEnumerable(); + } + } +} diff --git a/src/SDKs/Billing/Management.Billing/Microsoft.Azure.Management.Billing.csproj b/src/SDKs/Billing/Management.Billing/Microsoft.Azure.Management.Billing.csproj index 12e93ac3d1ea..4793ae7c0b59 100644 --- a/src/SDKs/Billing/Management.Billing/Microsoft.Azure.Management.Billing.csproj +++ b/src/SDKs/Billing/Management.Billing/Microsoft.Azure.Management.Billing.csproj @@ -5,11 +5,16 @@ Microsoft Azure Billing Management Library - 2.0.0-preview + 2.1.0-preview Microsoft.Azure.Management.Billing Microsoft.Azure.Management.Billing Microsoft Azure Billing management;Billing;Billing management; - + + + + net452;netstandard1.4 diff --git a/src/SDKs/Billing/Management.Billing/generate.ps1 b/src/SDKs/Billing/Management.Billing/generate.ps1 new file mode 100644 index 000000000000..e825aefb377b --- /dev/null +++ b/src/SDKs/Billing/Management.Billing/generate.ps1 @@ -0,0 +1 @@ +powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "billing/resource-manager" -PowershellInvoker -AutoRestVersion "latest" \ No newline at end of file diff --git a/src/SDKs/_metadata/billing_resource-manager.txt b/src/SDKs/_metadata/billing_resource-manager.txt new file mode 100644 index 000000000000..cfe341ad7e2f Binary files /dev/null and b/src/SDKs/_metadata/billing_resource-manager.txt differ