diff --git a/services/avs/mgmt/2020-03-20/avs/authorizations.go b/services/avs/mgmt/2020-03-20/avs/authorizations.go index ad0a1bab8c9d..e2f414dd7450 100644 --- a/services/avs/mgmt/2020-03-20/avs/authorizations.go +++ b/services/avs/mgmt/2020-03-20/avs/authorizations.go @@ -48,7 +48,7 @@ func NewAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) A // privateCloudName - the name of the private cloud. // authorizationName - name of the ExpressRoute Circuit Authorization in the private cloud // authorization - an ExpressRoute Circuit Authorization -func (client AuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization interface{}) (result AuthorizationsCreateOrUpdateFuture, err error) { +func (client AuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization ExpressRouteAuthorization) (result AuthorizationsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationsClient.CreateOrUpdate") defer func() { @@ -85,7 +85,7 @@ func (client AuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceG } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization interface{}) (*http.Request, error) { +func (client AuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization ExpressRouteAuthorization) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationName": autorest.Encode("path", authorizationName), "privateCloudName": autorest.Encode("path", privateCloudName), @@ -98,6 +98,7 @@ func (client AuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, r "api-version": APIVersion, } + authorization.ExpressRouteAuthorizationProperties = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/avs/mgmt/2020-03-20/avs/avsapi/interfaces.go b/services/avs/mgmt/2020-03-20/avs/avsapi/interfaces.go index 35b7e74fb1b3..891b1bb0f547 100644 --- a/services/avs/mgmt/2020-03-20/avs/avsapi/interfaces.go +++ b/services/avs/mgmt/2020-03-20/avs/avsapi/interfaces.go @@ -68,7 +68,7 @@ var _ ClustersClientAPI = (*avs.ClustersClient)(nil) // HcxEnterpriseSitesClientAPI contains the set of methods on the HcxEnterpriseSitesClient type. type HcxEnterpriseSitesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite interface{}) (result avs.HcxEnterpriseSite, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite avs.HcxEnterpriseSite) (result avs.HcxEnterpriseSite, err error) Delete(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string) (result avs.HcxEnterpriseSite, err error) List(ctx context.Context, resourceGroupName string, privateCloudName string) (result avs.HcxEnterpriseSiteListPage, err error) @@ -79,7 +79,7 @@ var _ HcxEnterpriseSitesClientAPI = (*avs.HcxEnterpriseSitesClient)(nil) // AuthorizationsClientAPI contains the set of methods on the AuthorizationsClient type. type AuthorizationsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization interface{}) (result avs.AuthorizationsCreateOrUpdateFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string, authorization avs.ExpressRouteAuthorization) (result avs.AuthorizationsCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string) (result avs.AuthorizationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, privateCloudName string, authorizationName string) (result avs.ExpressRouteAuthorization, err error) List(ctx context.Context, resourceGroupName string, privateCloudName string) (result avs.ExpressRouteAuthorizationListPage, err error) diff --git a/services/avs/mgmt/2020-03-20/avs/hcxenterprisesites.go b/services/avs/mgmt/2020-03-20/avs/hcxenterprisesites.go index c1f162dc72f6..51e67a43883b 100644 --- a/services/avs/mgmt/2020-03-20/avs/hcxenterprisesites.go +++ b/services/avs/mgmt/2020-03-20/avs/hcxenterprisesites.go @@ -49,7 +49,7 @@ func NewHcxEnterpriseSitesClientWithBaseURI(baseURI string, subscriptionID strin // privateCloudName - the name of the private cloud. // hcxEnterpriseSiteName - name of the HCX Enterprise Site in the private cloud // hcxEnterpriseSite - the HCX Enterprise Site -func (client HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite interface{}) (result HcxEnterpriseSite, err error) { +func (client HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite HcxEnterpriseSite) (result HcxEnterpriseSite, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/HcxEnterpriseSitesClient.CreateOrUpdate") defer func() { @@ -92,7 +92,7 @@ func (client HcxEnterpriseSitesClient) CreateOrUpdate(ctx context.Context, resou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client HcxEnterpriseSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite interface{}) (*http.Request, error) { +func (client HcxEnterpriseSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateCloudName string, hcxEnterpriseSiteName string, hcxEnterpriseSite HcxEnterpriseSite) (*http.Request, error) { pathParameters := map[string]interface{}{ "hcxEnterpriseSiteName": autorest.Encode("path", hcxEnterpriseSiteName), "privateCloudName": autorest.Encode("path", privateCloudName), @@ -105,6 +105,7 @@ func (client HcxEnterpriseSitesClient) CreateOrUpdatePreparer(ctx context.Contex "api-version": APIVersion, } + hcxEnterpriseSite.HcxEnterpriseSiteProperties = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/avs/mgmt/2020-03-20/avs/models.go b/services/avs/mgmt/2020-03-20/avs/models.go index becb17923604..d9d5dde5196a 100644 --- a/services/avs/mgmt/2020-03-20/avs/models.go +++ b/services/avs/mgmt/2020-03-20/avs/models.go @@ -352,13 +352,16 @@ func (page ClusterListPage) Values() []Cluster { } // Creates a new instance of the ClusterListPage type. -func NewClusterListPage(getNextPage func(context.Context, ClusterList) (ClusterList, error)) ClusterListPage { - return ClusterListPage{fn: getNextPage} +func NewClusterListPage(cur ClusterList, getNextPage func(context.Context, ClusterList) (ClusterList, error)) ClusterListPage { + return ClusterListPage{ + fn: getNextPage, + cl: cur, + } } // ClusterProperties the properties of a cluster type ClusterProperties struct { - // ProvisioningState - READ-ONLY; The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + // ProvisioningState - The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' ProvisioningState ClusterProvisioningState `json:"provisioningState,omitempty"` // ClusterID - READ-ONLY; The identity ClusterID *int32 `json:"clusterId,omitempty"` @@ -371,6 +374,9 @@ type ClusterProperties struct { // MarshalJSON is the custom marshaler for ClusterProperties. func (cp ClusterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cp.ProvisioningState != "" { + objectMap["provisioningState"] = cp.ProvisioningState + } if cp.ClusterSize != nil { objectMap["clusterSize"] = cp.ClusterSize } @@ -406,7 +412,8 @@ func (future *ClustersCreateOrUpdateFuture) Result(client ClustersClient) (c Clu return } -// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersDeleteFuture struct { azure.Future } @@ -428,7 +435,8 @@ func (future *ClustersDeleteFuture) Result(client ClustersClient) (ar autorest.R return } -// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// ClustersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ClustersUpdateFuture struct { azure.Future } @@ -519,7 +527,8 @@ type ErrorAdditionalInfo struct { Info interface{} `json:"info,omitempty"` } -// ErrorResponse the resource management error response. +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.) type ErrorResponse struct { // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` @@ -536,7 +545,7 @@ type ErrorResponse struct { // ExpressRouteAuthorization expressRoute Circuit Authorization type ExpressRouteAuthorization struct { autorest.Response `json:"-"` - // ExpressRouteAuthorizationProperties - The properties of an ExpressRoute Circuit Authorization resource + // ExpressRouteAuthorizationProperties - READ-ONLY; The properties of an ExpressRoute Circuit Authorization resource *ExpressRouteAuthorizationProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource ID. ID *string `json:"id,omitempty"` @@ -549,9 +558,6 @@ type ExpressRouteAuthorization struct { // MarshalJSON is the custom marshaler for ExpressRouteAuthorization. func (era ExpressRouteAuthorization) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if era.ExpressRouteAuthorizationProperties != nil { - objectMap["properties"] = era.ExpressRouteAuthorizationProperties - } return json.Marshal(objectMap) } @@ -759,8 +765,11 @@ func (page ExpressRouteAuthorizationListPage) Values() []ExpressRouteAuthorizati } // Creates a new instance of the ExpressRouteAuthorizationListPage type. -func NewExpressRouteAuthorizationListPage(getNextPage func(context.Context, ExpressRouteAuthorizationList) (ExpressRouteAuthorizationList, error)) ExpressRouteAuthorizationListPage { - return ExpressRouteAuthorizationListPage{fn: getNextPage} +func NewExpressRouteAuthorizationListPage(cur ExpressRouteAuthorizationList, getNextPage func(context.Context, ExpressRouteAuthorizationList) (ExpressRouteAuthorizationList, error)) ExpressRouteAuthorizationListPage { + return ExpressRouteAuthorizationListPage{ + fn: getNextPage, + eral: cur, + } } // ExpressRouteAuthorizationProperties the properties of an ExpressRoute Circuit Authorization resource @@ -776,7 +785,7 @@ type ExpressRouteAuthorizationProperties struct { // HcxEnterpriseSite an HCX Enterprise Site resource type HcxEnterpriseSite struct { autorest.Response `json:"-"` - // HcxEnterpriseSiteProperties - The properties of an HCX Enterprise Site resource + // HcxEnterpriseSiteProperties - READ-ONLY; The properties of an HCX Enterprise Site resource *HcxEnterpriseSiteProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource ID. ID *string `json:"id,omitempty"` @@ -789,9 +798,6 @@ type HcxEnterpriseSite struct { // MarshalJSON is the custom marshaler for HcxEnterpriseSite. func (hes HcxEnterpriseSite) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if hes.HcxEnterpriseSiteProperties != nil { - objectMap["properties"] = hes.HcxEnterpriseSiteProperties - } return json.Marshal(objectMap) } @@ -998,8 +1004,11 @@ func (page HcxEnterpriseSiteListPage) Values() []HcxEnterpriseSite { } // Creates a new instance of the HcxEnterpriseSiteListPage type. -func NewHcxEnterpriseSiteListPage(getNextPage func(context.Context, HcxEnterpriseSiteList) (HcxEnterpriseSiteList, error)) HcxEnterpriseSiteListPage { - return HcxEnterpriseSiteListPage{fn: getNextPage} +func NewHcxEnterpriseSiteListPage(cur HcxEnterpriseSiteList, getNextPage func(context.Context, HcxEnterpriseSiteList) (HcxEnterpriseSiteList, error)) HcxEnterpriseSiteListPage { + return HcxEnterpriseSiteListPage{ + fn: getNextPage, + hesl: cur, + } } // HcxEnterpriseSiteProperties the properties of an HCX Enterprise Site @@ -1034,8 +1043,20 @@ type IdentitySource struct { Password *string `json:"password,omitempty"` } +// LogSpecification specifications of the Log for Azure Monitoring +type LogSpecification struct { + // Name - Name of the log + Name *string `json:"name,omitempty"` + // DisplayName - Localized friendly display name of the log + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Blob duration of the log + BlobDuration *string `json:"blobDuration,omitempty"` +} + // ManagementCluster the properties of a default cluster type ManagementCluster struct { + // ProvisioningState - The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' + ProvisioningState ClusterProvisioningState `json:"provisioningState,omitempty"` // ClusterID - READ-ONLY; The identity ClusterID *int32 `json:"clusterId,omitempty"` // Hosts - READ-ONLY; The hosts @@ -1047,18 +1068,80 @@ type ManagementCluster struct { // MarshalJSON is the custom marshaler for ManagementCluster. func (mc ManagementCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if mc.ProvisioningState != "" { + objectMap["provisioningState"] = mc.ProvisioningState + } if mc.ClusterSize != nil { objectMap["clusterSize"] = mc.ClusterSize } return json.Marshal(objectMap) } +// MetricDimension specifications of the Dimension of metrics +type MetricDimension struct { + // Name - Name of the dimension + Name *string `json:"name,omitempty"` + // DisplayName - Localized friendly display name of the dimension + DisplayName *string `json:"displayName,omitempty"` +} + +// MetricSpecification specifications of the Metrics for Azure Monitoring +type MetricSpecification struct { + // Name - Name of the metric + Name *string `json:"name,omitempty"` + // DisplayName - Localized friendly display name of the metric + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - Localized friendly description of the metric + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - Unit that makes sense for the metric + Unit *string `json:"unit,omitempty"` + // Category - Name of the metric category that the metric belongs to. A metric can only belong to a single category. + Category *string `json:"category,omitempty"` + // AggregationType - Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + AggregationType *string `json:"aggregationType,omitempty"` + // SupportedAggregationTypes - Supported aggregation types + SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"` + // SupportedTimeGrainTypes - Supported time grain types + SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` + // FillGapWithZero - Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // Dimensions - Dimensions of the metric + Dimensions *[]MetricDimension `json:"dimensions,omitempty"` + // EnableRegionalMdmAccount - Whether or not the service is using regional MDM accounts. + EnableRegionalMdmAccount *string `json:"enableRegionalMdmAccount,omitempty"` + // SourceMdmAccount - The name of the MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // SourceMdmNamespace - The name of the MDM namespace. + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` +} + // Operation a REST API operation type Operation struct { // Name - READ-ONLY; Name of the operation being performed on this object Name *string `json:"name,omitempty"` // Display - READ-ONLY; Contains the localized display information for this operation Display *OperationDisplay `json:"display,omitempty"` + // IsDataAction - Gets or sets a value indicating whether the operation is a data action or not + IsDataAction *bool `json:"isDataAction,omitempty"` + // Origin - Origin of the operation + Origin *string `json:"origin,omitempty"` + // Properties - Properties of the operation + Properties *OperationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if o.IsDataAction != nil { + objectMap["isDataAction"] = o.IsDataAction + } + if o.Origin != nil { + objectMap["origin"] = o.Origin + } + if o.Properties != nil { + objectMap["properties"] = o.Properties + } + return json.Marshal(objectMap) } // OperationDisplay contains the localized display information for this operation @@ -1225,8 +1308,17 @@ func (page OperationListPage) Values() []Operation { } // Creates a new instance of the OperationListPage type. -func NewOperationListPage(getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage { - return OperationListPage{fn: getNextPage} +func NewOperationListPage(cur OperationList, getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage { + return OperationListPage{ + fn: getNextPage, + ol: cur, + } +} + +// OperationProperties extra Operation properties +type OperationProperties struct { + // ServiceSpecification - Service specifications of the operation + ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } // PrivateCloud a private cloud resource @@ -1496,8 +1588,11 @@ func (page PrivateCloudListPage) Values() []PrivateCloud { } // Creates a new instance of the PrivateCloudListPage type. -func NewPrivateCloudListPage(getNextPage func(context.Context, PrivateCloudList) (PrivateCloudList, error)) PrivateCloudListPage { - return PrivateCloudListPage{fn: getNextPage} +func NewPrivateCloudListPage(cur PrivateCloudList, getNextPage func(context.Context, PrivateCloudList) (PrivateCloudList, error)) PrivateCloudListPage { + return PrivateCloudListPage{ + fn: getNextPage, + pcl: cur, + } } // PrivateCloudProperties the properties of a private cloud resource @@ -1559,8 +1654,8 @@ func (pcp PrivateCloudProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// PrivateCloudsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// PrivateCloudsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type PrivateCloudsCreateOrUpdateFuture struct { azure.Future } @@ -1728,6 +1823,14 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// ServiceSpecification service specification payload +type ServiceSpecification struct { + // LogSpecifications - Specifications of the Log for Azure Monitoring + LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` + // MetricSpecifications - Specifications of the Metrics for Azure Monitoring + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` +} + // Sku the resource model definition representing SKU type Sku struct { // Name - The name of the SKU.