diff --git a/profiles/2017-03-09/network/mgmt/network/models.go b/profiles/2017-03-09/network/mgmt/network/models.go index 896f18980ee8..e0088ddbb392 100644 --- a/profiles/2017-03-09/network/mgmt/network/models.go +++ b/profiles/2017-03-09/network/mgmt/network/models.go @@ -32,7 +32,6 @@ type ExpressRouteCircuitAuthorizationsClient = original.ExpressRouteCircuitAutho type ExpressRouteCircuitPeeringsClient = original.ExpressRouteCircuitPeeringsClient type ExpressRouteCircuitsClient = original.ExpressRouteCircuitsClient type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersClient -type InterfacesClient = original.InterfacesClient type LoadBalancersClient = original.LoadBalancersClient type LocalNetworkGatewaysClient = original.LocalNetworkGatewaysClient type ApplicationGatewayCookieBasedAffinity = original.ApplicationGatewayCookieBasedAffinity @@ -513,12 +512,6 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return original.NewExpressRouteServiceProvidersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return original.NewLoadBalancersClient(subscriptionID) } diff --git a/profiles/latest/network/mgmt/network/models.go b/profiles/latest/network/mgmt/network/models.go index 482345fc8e18..6762f83b585e 100644 --- a/profiles/latest/network/mgmt/network/models.go +++ b/profiles/latest/network/mgmt/network/models.go @@ -40,7 +40,6 @@ type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersC type InboundNatRulesClient = original.InboundNatRulesClient type InterfaceIPConfigurationsClient = original.InterfaceIPConfigurationsClient type InterfaceLoadBalancersClient = original.InterfaceLoadBalancersClient -type InterfacesClient = original.InterfacesClient type LoadBalancerBackendAddressPoolsClient = original.LoadBalancerBackendAddressPoolsClient type LoadBalancerFrontendIPConfigurationsClient = original.LoadBalancerFrontendIPConfigurationsClient type LoadBalancerLoadBalancingRulesClient = original.LoadBalancerLoadBalancingRulesClient @@ -1180,12 +1179,6 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { return original.NewInterfaceLoadBalancersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient { return original.NewLoadBalancerBackendAddressPoolsClient(subscriptionID) } diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index f0a8c69de982..9e8622d8222e 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -55,7 +55,6 @@ type InboundNatRulesClient = original.InboundNatRulesClient type InterfaceEndpointsClient = original.InterfaceEndpointsClient type InterfaceIPConfigurationsClient = original.InterfaceIPConfigurationsClient type InterfaceLoadBalancersClient = original.InterfaceLoadBalancersClient -type InterfacesClient = original.InterfacesClient type InterfaceTapConfigurationsClient = original.InterfaceTapConfigurationsClient type LoadBalancerBackendAddressPoolsClient = original.LoadBalancerBackendAddressPoolsClient type LoadBalancerFrontendIPConfigurationsClient = original.LoadBalancerFrontendIPConfigurationsClient @@ -1765,12 +1764,6 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { return original.NewInterfaceLoadBalancersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConfigurationsClient { return original.NewInterfaceTapConfigurationsClient(subscriptionID) } diff --git a/profiles/preview/preview/network/mgmt/network/models.go b/profiles/preview/preview/network/mgmt/network/models.go index a3ecb2be065b..53406eeb1fc5 100644 --- a/profiles/preview/preview/network/mgmt/network/models.go +++ b/profiles/preview/preview/network/mgmt/network/models.go @@ -32,7 +32,6 @@ type ExpressRouteCircuitAuthorizationsClient = original.ExpressRouteCircuitAutho type ExpressRouteCircuitPeeringsClient = original.ExpressRouteCircuitPeeringsClient type ExpressRouteCircuitsClient = original.ExpressRouteCircuitsClient type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersClient -type InterfacesClient = original.InterfacesClient type LoadBalancersClient = original.LoadBalancersClient type LocalNetworkGatewaysClient = original.LocalNetworkGatewaysClient type ApplicationGatewayCookieBasedAffinity = original.ApplicationGatewayCookieBasedAffinity @@ -471,12 +470,6 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return original.NewExpressRouteServiceProvidersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return original.NewLoadBalancersClient(subscriptionID) } diff --git a/profiles/preview/preview/subscription/mgmt/subscription/models.go b/profiles/preview/preview/subscription/mgmt/subscription/models.go index 44ca46472e51..56d4481ecf41 100644 --- a/profiles/preview/preview/subscription/mgmt/subscription/models.go +++ b/profiles/preview/preview/subscription/mgmt/subscription/models.go @@ -19,7 +19,11 @@ package subscription -import original "github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription" +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription" +) const ( DefaultBaseURI = original.DefaultBaseURI @@ -99,6 +103,18 @@ func PossibleSpendingLimitValues() []SpendingLimit { func PossibleStateValues() []State { return original.PossibleStateValues() } +func NewListResultIterator(page ListResultPage) ListResultIterator { + return original.NewListResultIterator(page) +} +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return original.NewListResultPage(getNextPage) +} +func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator { + return original.NewTenantListResultIterator(page) +} +func NewTenantListResultPage(getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage { + return original.NewTenantListResultPage(getNextPage) +} func NewOperationsClient() OperationsClient { return original.NewOperationsClient() } diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go index c8180d7a2c9c..b215b83079b6 100644 --- a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/models.go @@ -179,6 +179,11 @@ func (iter DefinitionListIterator) Value() Definition { return iter.page.Values()[iter.i] } +// Creates a new instance of the DefinitionListIterator type. +func NewDefinitionListIterator(page DefinitionListPage) DefinitionListIterator { + return DefinitionListIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (dl DefinitionList) IsEmpty() bool { return dl.Value == nil || len(*dl.Value) == 0 @@ -248,6 +253,11 @@ func (page DefinitionListPage) Values() []Definition { return *page.dl.Value } +// Creates a new instance of the DefinitionListPage type. +func NewDefinitionListPage(getNextPage func(context.Context, DefinitionList) (DefinitionList, error)) DefinitionListPage { + return DefinitionListPage{fn: getNextPage} +} + // DefinitionProperties the subscription definition properties. type DefinitionProperties struct { // SubscriptionID - The ID of the subscription. @@ -383,6 +393,11 @@ func (iter OperationListResultIterator) Value() Operation { return iter.page.Values()[iter.i] } +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 @@ -451,3 +466,8 @@ func (page OperationListResultPage) Values() []Operation { } return *page.olr.Value } + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} diff --git a/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go new file mode 100644 index 000000000000..8c936dd39d2b --- /dev/null +++ b/services/preview/subscription/mgmt/2017-11-01-preview/subscription/subscriptionapi/interfaces.go @@ -0,0 +1,41 @@ +package subscriptionapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2017-11-01-preview/subscription" + "github.com/satori/go.uuid" +) + +// DefinitionsOperationMetadataClientAPI contains the set of methods on the DefinitionsOperationMetadataClient type. +type DefinitionsOperationMetadataClientAPI interface { + List(ctx context.Context) (result subscription.OperationListResultPage, err error) +} + +var _ DefinitionsOperationMetadataClientAPI = (*subscription.DefinitionsOperationMetadataClient)(nil) + +// DefinitionsClientAPI contains the set of methods on the DefinitionsClient type. +type DefinitionsClientAPI interface { + Create(ctx context.Context, subscriptionDefinitionName string, body subscription.Definition) (result subscription.DefinitionsCreateFuture, err error) + Get(ctx context.Context, subscriptionDefinitionName string) (result subscription.Definition, err error) + GetOperationStatus(ctx context.Context, operationID uuid.UUID) (result subscription.Definition, err error) + List(ctx context.Context) (result subscription.DefinitionListPage, err error) +} + +var _ DefinitionsClientAPI = (*subscription.DefinitionsClient)(nil) diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go index 574b807fb137..61fed2710d39 100644 --- a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/models.go @@ -230,6 +230,11 @@ func (iter ListResultIterator) Value() Model { return iter.page.Values()[iter.i] } +// Creates a new instance of the ListResultIterator type. +func NewListResultIterator(page ListResultPage) ListResultIterator { + return ListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (lr ListResult) IsEmpty() bool { return lr.Value == nil || len(*lr.Value) == 0 @@ -299,6 +304,11 @@ func (page ListResultPage) Values() []Model { return *page.lr.Value } +// Creates a new instance of the ListResultPage type. +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{fn: getNextPage} +} + // Location location information. type Location struct { // ID - The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. @@ -469,6 +479,11 @@ func (iter TenantListResultIterator) Value() TenantIDDescription { return iter.page.Values()[iter.i] } +// Creates a new instance of the TenantListResultIterator type. +func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator { + return TenantListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (tlr TenantListResult) IsEmpty() bool { return tlr.Value == nil || len(*tlr.Value) == 0 @@ -537,3 +552,8 @@ func (page TenantListResultPage) Values() []TenantIDDescription { } return *page.tlr.Value } + +// Creates a new instance of the TenantListResultPage type. +func NewTenantListResultPage(getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage { + return TenantListResultPage{fn: getNextPage} +} diff --git a/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go new file mode 100644 index 000000000000..97f10863bad0 --- /dev/null +++ b/services/preview/subscription/mgmt/2018-03-01-preview/subscription/subscriptionapi/interfaces.go @@ -0,0 +1,60 @@ +package subscriptionapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/subscription/mgmt/2018-03-01-preview/subscription" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result subscription.OperationListResult, err error) +} + +var _ OperationsClientAPI = (*subscription.OperationsClient)(nil) + +// OperationsGroupClientAPI contains the set of methods on the OperationsGroupClient type. +type OperationsGroupClientAPI interface { + List(ctx context.Context) (result subscription.OperationListResultType, err error) +} + +var _ OperationsGroupClientAPI = (*subscription.OperationsGroupClient)(nil) + +// FactoryClientAPI contains the set of methods on the FactoryClient type. +type FactoryClientAPI interface { + CreateSubscriptionInEnrollmentAccount(ctx context.Context, enrollmentAccountName string, body subscription.CreationParameters) (result subscription.FactoryCreateSubscriptionInEnrollmentAccountFuture, err error) +} + +var _ FactoryClientAPI = (*subscription.FactoryClient)(nil) + +// SubscriptionsClientAPI contains the set of methods on the SubscriptionsClient type. +type SubscriptionsClientAPI interface { + Get(ctx context.Context, subscriptionID string) (result subscription.Model, err error) + List(ctx context.Context) (result subscription.ListResultPage, err error) + ListLocations(ctx context.Context, subscriptionID string) (result subscription.LocationListResult, err error) +} + +var _ SubscriptionsClientAPI = (*subscription.SubscriptionsClient)(nil) + +// TenantsClientAPI contains the set of methods on the TenantsClient type. +type TenantsClientAPI interface { + List(ctx context.Context) (result subscription.TenantListResultPage, err error) +} + +var _ TenantsClientAPI = (*subscription.TenantsClient)(nil)