diff --git a/services/confluent/mgmt/2020-03-01/confluent/CHANGELOG.md b/services/confluent/mgmt/2020-03-01/confluent/CHANGELOG.md index 52911e4cc5e4..30c381c9bf25 100644 --- a/services/confluent/mgmt/2020-03-01/confluent/CHANGELOG.md +++ b/services/confluent/mgmt/2020-03-01/confluent/CHANGELOG.md @@ -1,2 +1,9 @@ -# Change History +# Unreleased +## Additive Changes + +### New Funcs + +1. OfferDetail.MarshalJSON() ([]byte, error) +1. OperationListResult.MarshalJSON() ([]byte, error) +1. OrganizationResourcePropertiesOfferDetail.MarshalJSON() ([]byte, error) diff --git a/services/confluent/mgmt/2020-03-01/confluent/_meta.json b/services/confluent/mgmt/2020-03-01/confluent/_meta.json index 1f3a91a8e6dd..9f4546949fc1 100644 --- a/services/confluent/mgmt/2020-03-01/confluent/_meta.json +++ b/services/confluent/mgmt/2020-03-01/confluent/_meta.json @@ -1,5 +1,5 @@ { - "commit": "d4bad535d456ee82c7fd17d1ec2b8802a0b83205", + "commit": "2970e417353ba5ace9234211e1858eebc1810eb5", "readme": "/_/azure-rest-api-specs/specification/confluent/resource-manager/readme.md", "tag": "package-2020-03-01", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/confluent/mgmt/2020-03-01/confluent/marketplaceagreements.go b/services/confluent/mgmt/2020-03-01/confluent/marketplaceagreements.go index fc3a87a8ab13..b65e603e8ac1 100644 --- a/services/confluent/mgmt/2020-03-01/confluent/marketplaceagreements.go +++ b/services/confluent/mgmt/2020-03-01/confluent/marketplaceagreements.go @@ -73,6 +73,11 @@ func (client MarketplaceAgreementsClient) CreatePreparer(ctx context.Context, bo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2020-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + body.ID = nil body.Name = nil body.Type = nil @@ -80,7 +85,8 @@ func (client MarketplaceAgreementsClient) CreatePreparer(ctx context.Context, bo autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", pathParameters)) + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) if body != nil { preparer = autorest.DecoratePreparer(preparer, autorest.WithJSON(body)) @@ -151,10 +157,16 @@ func (client MarketplaceAgreementsClient) ListPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2020-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", pathParameters)) + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/confluent/mgmt/2020-03-01/confluent/models.go b/services/confluent/mgmt/2020-03-01/confluent/models.go index c86d2cf3d3f8..4b50b7069f70 100644 --- a/services/confluent/mgmt/2020-03-01/confluent/models.go +++ b/services/confluent/mgmt/2020-03-01/confluent/models.go @@ -302,10 +302,31 @@ type OfferDetail struct { PlanName *string `json:"planName,omitempty"` // TermUnit - Offer Plan Term unit TermUnit *string `json:"termUnit,omitempty"` - // Status - SaaS Offer Status. Possible values include: 'SaaSOfferStatusStarted', 'SaaSOfferStatusPendingFulfillmentStart', 'SaaSOfferStatusInProgress', 'SaaSOfferStatusSubscribed', 'SaaSOfferStatusSuspended', 'SaaSOfferStatusReinstated', 'SaaSOfferStatusSucceeded', 'SaaSOfferStatusFailed', 'SaaSOfferStatusUnsubscribed', 'SaaSOfferStatusUpdating' + // Status - READ-ONLY; SaaS Offer Status. Possible values include: 'SaaSOfferStatusStarted', 'SaaSOfferStatusPendingFulfillmentStart', 'SaaSOfferStatusInProgress', 'SaaSOfferStatusSubscribed', 'SaaSOfferStatusSuspended', 'SaaSOfferStatusReinstated', 'SaaSOfferStatusSucceeded', 'SaaSOfferStatusFailed', 'SaaSOfferStatusUnsubscribed', 'SaaSOfferStatusUpdating' Status SaaSOfferStatus `json:"status,omitempty"` } +// MarshalJSON is the custom marshaler for OfferDetail. +func (od OfferDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if od.PublisherID != nil { + objectMap["publisherId"] = od.PublisherID + } + if od.ID != nil { + objectMap["id"] = od.ID + } + if od.PlanID != nil { + objectMap["planId"] = od.PlanID + } + if od.PlanName != nil { + objectMap["planName"] = od.PlanName + } + if od.TermUnit != nil { + objectMap["termUnit"] = od.TermUnit + } + return json.Marshal(objectMap) +} + // OperationDisplay the object that represents the operation. type OperationDisplay struct { // Provider - Service provider: Microsoft.Confluent @@ -323,10 +344,19 @@ type OperationListResult struct { autorest.Response `json:"-"` // Value - List of Confluent operations supported by the Microsoft.Confluent provider. Value *[]OperationResult `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for OperationListResult. +func (olr OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if olr.Value != nil { + objectMap["value"] = olr.Value + } + return json.Marshal(objectMap) +} + // OperationListResultIterator provides access to a complete listing of OperationResult values. type OperationListResultIterator struct { i int @@ -832,7 +862,7 @@ func NewOrganizationResourceListResultPage(cur OrganizationResourceListResult, g type OrganizationResourceProperties struct { // CreatedTime - READ-ONLY; The creation time of the resource. CreatedTime *date.Time `json:"createdTime,omitempty"` - // ProvisioningState - Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + // ProvisioningState - READ-ONLY; Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' ProvisioningState ProvisionState `json:"provisioningState,omitempty"` // OrganizationID - READ-ONLY; Id of the Confluent organization. OrganizationID *string `json:"organizationId,omitempty"` @@ -847,9 +877,6 @@ type OrganizationResourceProperties struct { // MarshalJSON is the custom marshaler for OrganizationResourceProperties. func (orp OrganizationResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if orp.ProvisioningState != "" { - objectMap["provisioningState"] = orp.ProvisioningState - } if orp.OfferDetail != nil { objectMap["offerDetail"] = orp.OfferDetail } @@ -863,7 +890,7 @@ func (orp OrganizationResourceProperties) MarshalJSON() ([]byte, error) { type OrganizationResourcePropertiesModel struct { // CreatedTime - READ-ONLY; The creation time of the resource. CreatedTime *date.Time `json:"createdTime,omitempty"` - // ProvisioningState - Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + // ProvisioningState - READ-ONLY; Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' ProvisioningState ProvisionState `json:"provisioningState,omitempty"` // OrganizationID - READ-ONLY; Id of the Confluent organization. OrganizationID *string `json:"organizationId,omitempty"` @@ -878,9 +905,6 @@ type OrganizationResourcePropertiesModel struct { // MarshalJSON is the custom marshaler for OrganizationResourcePropertiesModel. func (orpm OrganizationResourcePropertiesModel) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if orpm.ProvisioningState != "" { - objectMap["provisioningState"] = orpm.ProvisioningState - } if orpm.OfferDetail != nil { objectMap["offerDetail"] = orpm.OfferDetail } @@ -902,10 +926,31 @@ type OrganizationResourcePropertiesOfferDetail struct { PlanName *string `json:"planName,omitempty"` // TermUnit - Offer Plan Term unit TermUnit *string `json:"termUnit,omitempty"` - // Status - SaaS Offer Status. Possible values include: 'SaaSOfferStatusStarted', 'SaaSOfferStatusPendingFulfillmentStart', 'SaaSOfferStatusInProgress', 'SaaSOfferStatusSubscribed', 'SaaSOfferStatusSuspended', 'SaaSOfferStatusReinstated', 'SaaSOfferStatusSucceeded', 'SaaSOfferStatusFailed', 'SaaSOfferStatusUnsubscribed', 'SaaSOfferStatusUpdating' + // Status - READ-ONLY; SaaS Offer Status. Possible values include: 'SaaSOfferStatusStarted', 'SaaSOfferStatusPendingFulfillmentStart', 'SaaSOfferStatusInProgress', 'SaaSOfferStatusSubscribed', 'SaaSOfferStatusSuspended', 'SaaSOfferStatusReinstated', 'SaaSOfferStatusSucceeded', 'SaaSOfferStatusFailed', 'SaaSOfferStatusUnsubscribed', 'SaaSOfferStatusUpdating' Status SaaSOfferStatus `json:"status,omitempty"` } +// MarshalJSON is the custom marshaler for OrganizationResourcePropertiesOfferDetail. +func (orpD OrganizationResourcePropertiesOfferDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if orpD.PublisherID != nil { + objectMap["publisherId"] = orpD.PublisherID + } + if orpD.ID != nil { + objectMap["id"] = orpD.ID + } + if orpD.PlanID != nil { + objectMap["planId"] = orpD.PlanID + } + if orpD.PlanName != nil { + objectMap["planName"] = orpD.PlanName + } + if orpD.TermUnit != nil { + objectMap["termUnit"] = orpD.TermUnit + } + return json.Marshal(objectMap) +} + // OrganizationResourcePropertiesUserDetail subscriber detail type OrganizationResourcePropertiesUserDetail struct { // FirstName - First name diff --git a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/CHANGELOG.md b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/CHANGELOG.md index 52911e4cc5e4..73c312bee8ff 100644 --- a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/CHANGELOG.md +++ b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/CHANGELOG.md @@ -1,2 +1,22 @@ -# Change History +# Unreleased +## Breaking Changes + +### Struct Changes + +#### Removed Struct Fields + +1. AgreementResource.Properties + +## Additive Changes + +### New Funcs + +1. *AgreementResource.UnmarshalJSON([]byte) error + +### Struct Changes + +#### New Struct Fields + +1. AgreementResource.*AgreementProperties +1. OperationResult.IsDataAction diff --git a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/_meta.json b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/_meta.json index 1c4f4f1434ea..5d8c420061c2 100644 --- a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/_meta.json +++ b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "2970e417353ba5ace9234211e1858eebc1810eb5", "readme": "/_/azure-rest-api-specs/specification/confluent/resource-manager/readme.md", "tag": "package-2020-03-01-preview", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/marketplaceagreements.go b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/marketplaceagreements.go index a28da103173b..6e2e50d21902 100644 --- a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/marketplaceagreements.go +++ b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/marketplaceagreements.go @@ -32,6 +32,8 @@ func NewMarketplaceAgreementsClientWithBaseURI(baseURI string, subscriptionID st } // Create sends the create request. +// Parameters: +// body - confluent Marketplace Agreement resource func (client MarketplaceAgreementsClient) Create(ctx context.Context, body *AgreementResource) (result AgreementResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/MarketplaceAgreementsClient.Create") @@ -71,6 +73,11 @@ func (client MarketplaceAgreementsClient) CreatePreparer(ctx context.Context, bo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + body.ID = nil body.Name = nil body.Type = nil @@ -78,7 +85,8 @@ func (client MarketplaceAgreementsClient) CreatePreparer(ctx context.Context, bo autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", pathParameters)) + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) if body != nil { preparer = autorest.DecoratePreparer(preparer, autorest.WithJSON(body)) @@ -149,10 +157,16 @@ func (client MarketplaceAgreementsClient) ListPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2020-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", pathParameters)) + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/agreements", pathParameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/models.go b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/models.go index 51b8dd037932..24faa1de0a18 100644 --- a/services/preview/confluent/mgmt/2020-03-01-preview/confluent/models.go +++ b/services/preview/confluent/mgmt/2020-03-01-preview/confluent/models.go @@ -49,20 +49,71 @@ type AgreementResource struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; The type of the agreement. Type *string `json:"type,omitempty"` - // Properties - Represents the properties of the resource. - Properties *AgreementProperties `json:"properties,omitempty"` + // AgreementProperties - Represents the properties of the resource. + *AgreementProperties `json:"properties,omitempty"` } // MarshalJSON is the custom marshaler for AgreementResource. func (ar AgreementResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ar.Properties != nil { - objectMap["properties"] = ar.Properties + if ar.AgreementProperties != nil { + objectMap["properties"] = ar.AgreementProperties } return json.Marshal(objectMap) } -// AgreementResourceListResponse response of a agreements operation. +// UnmarshalJSON is the custom unmarshaler for AgreementResource struct. +func (ar *AgreementResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ar.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ar.Type = &typeVar + } + case "properties": + if v != nil { + var agreementProperties AgreementProperties + err = json.Unmarshal(*v, &agreementProperties) + if err != nil { + return err + } + ar.AgreementProperties = &agreementProperties + } + } + } + + return nil +} + +// AgreementResourceListResponse response of a list operation. type AgreementResourceListResponse struct { autorest.Response `json:"-"` // Value - Results of a list operation. @@ -432,6 +483,8 @@ type OperationResult struct { Name *string `json:"name,omitempty"` // Display - The object that represents the operation. Display *OperationDisplay `json:"display,omitempty"` + // IsDataAction - Indicates whether the operation is a data action + IsDataAction *bool `json:"isDataAction,omitempty"` } // OrganizationCreateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -779,7 +832,7 @@ func NewOrganizationResourceListResultPage(cur OrganizationResourceListResult, g type OrganizationResourceProperties struct { // CreatedTime - READ-ONLY; The creation time of the resource. CreatedTime *date.Time `json:"createdTime,omitempty"` - // ProvisioningState - Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + // ProvisioningState - READ-ONLY; Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' ProvisioningState ProvisionState `json:"provisioningState,omitempty"` // OrganizationID - READ-ONLY; Id of the Confluent organization. OrganizationID *string `json:"organizationId,omitempty"` @@ -794,9 +847,6 @@ type OrganizationResourceProperties struct { // MarshalJSON is the custom marshaler for OrganizationResourceProperties. func (orp OrganizationResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if orp.ProvisioningState != "" { - objectMap["provisioningState"] = orp.ProvisioningState - } if orp.OfferDetail != nil { objectMap["offerDetail"] = orp.OfferDetail } @@ -810,7 +860,7 @@ func (orp OrganizationResourceProperties) MarshalJSON() ([]byte, error) { type OrganizationResourcePropertiesModel struct { // CreatedTime - READ-ONLY; The creation time of the resource. CreatedTime *date.Time `json:"createdTime,omitempty"` - // ProvisioningState - Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' + // ProvisioningState - READ-ONLY; Provision states for confluent RP. Possible values include: 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled', 'Deleted', 'NotSpecified' ProvisioningState ProvisionState `json:"provisioningState,omitempty"` // OrganizationID - READ-ONLY; Id of the Confluent organization. OrganizationID *string `json:"organizationId,omitempty"` @@ -825,9 +875,6 @@ type OrganizationResourcePropertiesModel struct { // MarshalJSON is the custom marshaler for OrganizationResourcePropertiesModel. func (orpm OrganizationResourcePropertiesModel) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if orpm.ProvisioningState != "" { - objectMap["provisioningState"] = orpm.ProvisioningState - } if orpm.OfferDetail != nil { objectMap["offerDetail"] = orpm.OfferDetail } diff --git a/services/preview/confluent/mgmt/2021-03-01-preview/confluent/CHANGELOG.md b/services/preview/confluent/mgmt/2021-03-01-preview/confluent/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/preview/confluent/mgmt/2021-03-01-preview/confluent/CHANGELOG.md +++ b/services/preview/confluent/mgmt/2021-03-01-preview/confluent/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/preview/confluent/mgmt/2021-03-01-preview/confluent/_meta.json b/services/preview/confluent/mgmt/2021-03-01-preview/confluent/_meta.json index 31d1e387667d..44053b98cd93 100644 --- a/services/preview/confluent/mgmt/2021-03-01-preview/confluent/_meta.json +++ b/services/preview/confluent/mgmt/2021-03-01-preview/confluent/_meta.json @@ -1,5 +1,5 @@ { - "commit": "6300f518091891b00c993e538dc2d282c9b814de", + "commit": "2970e417353ba5ace9234211e1858eebc1810eb5", "readme": "/_/azure-rest-api-specs/specification/confluent/resource-manager/readme.md", "tag": "package-2021-03-01-preview", "use": "@microsoft.azure/autorest.go@2.1.187",