From 59edeb76c7a4d0761a4f4117dc696ef826760150 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 19 Apr 2019 23:50:22 +0000 Subject: [PATCH] Generated from 97da0de9df43c688cbe4effaf39336c192618949 Task 4321317: RI renewal : ARM review --- .../reservations/mgmt/reservations/models.go | 3 + .../mgmt/2018-06-01/reservations/models.go | 63 +++++------ .../mgmt/2019-04-01/reservations/models.go | 102 ++++++++++-------- .../2019-04-01/reservations/reservation.go | 10 +- .../reservationsapi/interfaces.go | 2 +- .../mgmt/2017-11-01/reservations/models.go | 63 +++++------ 6 files changed, 117 insertions(+), 126 deletions(-) diff --git a/profiles/preview/preview/reservations/mgmt/reservations/models.go b/profiles/preview/preview/reservations/mgmt/reservations/models.go index af54cdd1ddbe..4c58cf519eef 100644 --- a/profiles/preview/preview/reservations/mgmt/reservations/models.go +++ b/profiles/preview/preview/reservations/mgmt/reservations/models.go @@ -173,6 +173,9 @@ type Properties = original.Properties type PurchaseRequest = original.PurchaseRequest type PurchaseRequestProperties = original.PurchaseRequestProperties type PurchaseRequestPropertiesReservedResourceProperties = original.PurchaseRequestPropertiesReservedResourceProperties +type RenewPropertiesResponse = original.RenewPropertiesResponse +type RenewPropertiesResponseLinks = original.RenewPropertiesResponseLinks +type RenewPropertiesResponseLockedPriceTotal = original.RenewPropertiesResponseLockedPriceTotal type ReservationMergeFuture = original.ReservationMergeFuture type ReservationUpdateFuture = original.ReservationUpdateFuture type Response = original.Response diff --git a/services/preview/reservations/mgmt/2018-06-01/reservations/models.go b/services/preview/reservations/mgmt/2018-06-01/reservations/models.go index 8bd085b03348..a5a4870586c3 100644 --- a/services/preview/reservations/mgmt/2018-06-01/reservations/models.go +++ b/services/preview/reservations/mgmt/2018-06-01/reservations/models.go @@ -259,11 +259,11 @@ type AppliedReservationList struct { // AppliedReservations ... type AppliedReservations struct { autorest.Response `json:"-"` - // ID - Identifier of the applied reservations + // ID - READ-ONLY; Identifier of the applied reservations ID *string `json:"id,omitempty"` - // Name - Name of resource + // Name - READ-ONLY; Name of resource Name *string `json:"name,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/AppliedReservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/AppliedReservations" Type *string `json:"type,omitempty"` *AppliedReservationsProperties `json:"properties,omitempty"` } @@ -271,15 +271,6 @@ type AppliedReservations struct { // MarshalJSON is the custom marshaler for AppliedReservations. func (ar AppliedReservations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ar.ID != nil { - objectMap["id"] = ar.ID - } - if ar.Name != nil { - objectMap["name"] = ar.Name - } - if ar.Type != nil { - objectMap["type"] = ar.Type - } if ar.AppliedReservationsProperties != nil { objectMap["properties"] = ar.AppliedReservationsProperties } @@ -344,15 +335,18 @@ type AppliedReservationsProperties struct { // Catalog ... type Catalog struct { - // ResourceType - The type of resource the SKU applies to. + // ResourceType - READ-ONLY; The type of resource the SKU applies to. ResourceType *string `json:"resourceType,omitempty"` - // Name - The name of SKU + // Name - READ-ONLY; The name of SKU Name *string `json:"name,omitempty"` - // Terms - Available reservation terms for this resource - Terms *[]ReservationTerm `json:"terms,omitempty"` - Locations *[]string `json:"locations,omitempty"` - SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` - Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` + // Terms - READ-ONLY; Available reservation terms for this resource + Terms *[]ReservationTerm `json:"terms,omitempty"` + // Locations - READ-ONLY + Locations *[]string `json:"locations,omitempty"` + // SkuProperties - READ-ONLY + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + // Restrictions - READ-ONLY + Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` } // Error ... @@ -912,12 +906,12 @@ type OrderProperties struct { type OrderResponse struct { autorest.Response `json:"-"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` *OrderProperties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservations" Type *string `json:"type,omitempty"` } @@ -927,18 +921,9 @@ func (or OrderResponse) MarshalJSON() ([]byte, error) { if or.Etag != nil { objectMap["etag"] = or.Etag } - if or.ID != nil { - objectMap["id"] = or.ID - } - if or.Name != nil { - objectMap["name"] = or.Name - } if or.OrderProperties != nil { objectMap["properties"] = or.OrderProperties } - if or.Type != nil { - objectMap["type"] = or.Type - } return json.Marshal(objectMap) } @@ -1068,7 +1053,7 @@ type Properties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // EffectiveDateTime - DateTime of the Reservation starting when this version is effective from. EffectiveDateTime *date.Time `json:"effectiveDateTime,omitempty"` - // LastUpdatedDateTime - DateTime of the last time the Reservation was updated. + // LastUpdatedDateTime - READ-ONLY; DateTime of the last time the Reservation was updated. LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"` // ExpiryDate - This is the date when the Reservation will expire. ExpiryDate *date.Date `json:"expiryDate,omitempty"` @@ -1089,7 +1074,7 @@ type ReservationMergeFuture struct { // If the operation has not completed it will return an error. func (future *ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", future.Response(), "Polling failure") return @@ -1118,7 +1103,7 @@ type ReservationUpdateFuture struct { // If the operation has not completed it will return an error. func (future *ReservationUpdateFuture) Result(client Client) (r Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", future.Response(), "Polling failure") return @@ -1140,16 +1125,16 @@ func (future *ReservationUpdateFuture) Result(client Client) (r Response, err er // Response ... type Response struct { autorest.Response `json:"-"` - // Location - The Azure Region where the reserved resource lives. + // Location - READ-ONLY; The Azure Region where the reserved resource lives. Location *string `json:"location,omitempty"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` Sku *SkuName `json:"sku,omitempty"` Properties *Properties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservationOrders/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservationOrders/reservations" Type *string `json:"type,omitempty"` } @@ -1185,7 +1170,7 @@ type SplitFuture struct { // If the operation has not completed it will return an error. func (future *SplitFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", future.Response(), "Polling failure") return diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/models.go b/services/preview/reservations/mgmt/2019-04-01/reservations/models.go index e474ab0b2f08..795fe69332cd 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/models.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/models.go @@ -255,11 +255,11 @@ type AppliedReservationList struct { // AppliedReservations ... type AppliedReservations struct { autorest.Response `json:"-"` - // ID - Identifier of the applied reservations + // ID - READ-ONLY; Identifier of the applied reservations ID *string `json:"id,omitempty"` - // Name - Name of resource + // Name - READ-ONLY; Name of resource Name *string `json:"name,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/AppliedReservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/AppliedReservations" Type *string `json:"type,omitempty"` *AppliedReservationsProperties `json:"properties,omitempty"` } @@ -267,15 +267,6 @@ type AppliedReservations struct { // MarshalJSON is the custom marshaler for AppliedReservations. func (ar AppliedReservations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ar.ID != nil { - objectMap["id"] = ar.ID - } - if ar.Name != nil { - objectMap["name"] = ar.Name - } - if ar.Type != nil { - objectMap["type"] = ar.Type - } if ar.AppliedReservationsProperties != nil { objectMap["properties"] = ar.AppliedReservationsProperties } @@ -376,15 +367,18 @@ type CalculatePriceResponsePropertiesPricingCurrencyTotal struct { // Catalog ... type Catalog struct { - // ResourceType - The type of resource the SKU applies to. + // ResourceType - READ-ONLY; The type of resource the SKU applies to. ResourceType *string `json:"resourceType,omitempty"` - // Name - The name of SKU + // Name - READ-ONLY; The name of SKU Name *string `json:"name,omitempty"` - // Terms - Available reservation terms for this resource - Terms *[]ReservationTerm `json:"terms,omitempty"` - Locations *[]string `json:"locations,omitempty"` - SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` - Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` + // Terms - READ-ONLY; Available reservation terms for this resource + Terms *[]ReservationTerm `json:"terms,omitempty"` + // Locations - READ-ONLY + Locations *[]string `json:"locations,omitempty"` + // SkuProperties - READ-ONLY + SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"` + // Restrictions - READ-ONLY + Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` } // Error ... @@ -949,7 +943,7 @@ type OrderPurchaseFuture struct { // If the operation has not completed it will return an error. func (future *OrderPurchaseFuture) Result(client OrderClient) (or OrderResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.OrderPurchaseFuture", "Result", future.Response(), "Polling failure") return @@ -972,12 +966,12 @@ func (future *OrderPurchaseFuture) Result(client OrderClient) (or OrderResponse, type OrderResponse struct { autorest.Response `json:"-"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` *OrderProperties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservations" Type *string `json:"type,omitempty"` } @@ -987,18 +981,9 @@ func (or OrderResponse) MarshalJSON() ([]byte, error) { if or.Etag != nil { objectMap["etag"] = or.Etag } - if or.ID != nil { - objectMap["id"] = or.ID - } - if or.Name != nil { - objectMap["name"] = or.Name - } if or.OrderProperties != nil { objectMap["properties"] = or.OrderProperties } - if or.Type != nil { - objectMap["type"] = or.Type - } return json.Marshal(objectMap) } @@ -1105,6 +1090,8 @@ type PatchProperties struct { // AppliedScopeType - Possible values include: 'Single', 'Shared' AppliedScopeType AppliedScopeType `json:"appliedScopeType,omitempty"` AppliedScopes *[]string `json:"appliedScopes,omitempty"` + Renew *bool `json:"renew,omitempty"` + RenewProperties *PurchaseRequest `json:"renewProperties,omitempty"` // InstanceFlexibility - Possible values include: 'On', 'Off' InstanceFlexibility InstanceFlexibility `json:"instanceFlexibility,omitempty"` // Name - Name of the Reservation @@ -1127,15 +1114,17 @@ type Properties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // EffectiveDateTime - DateTime of the Reservation starting when this version is effective from. EffectiveDateTime *date.Time `json:"effectiveDateTime,omitempty"` - // LastUpdatedDateTime - DateTime of the last time the Reservation was updated. + // LastUpdatedDateTime - READ-ONLY; DateTime of the last time the Reservation was updated. LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"` // ExpiryDate - This is the date when the Reservation will expire. ExpiryDate *date.Date `json:"expiryDate,omitempty"` // SkuDescription - Description of the SKU in english. - SkuDescription *string `json:"skuDescription,omitempty"` - ExtendedStatusInfo *ExtendedStatusInfo `json:"extendedStatusInfo,omitempty"` - SplitProperties *SplitPropertiesType `json:"splitProperties,omitempty"` - MergeProperties *MergePropertiesType `json:"mergeProperties,omitempty"` + SkuDescription *string `json:"skuDescription,omitempty"` + ExtendedStatusInfo *ExtendedStatusInfo `json:"extendedStatusInfo,omitempty"` + SplitProperties *SplitPropertiesType `json:"splitProperties,omitempty"` + MergeProperties *MergePropertiesType `json:"mergeProperties,omitempty"` + Renew *bool `json:"renew,omitempty"` + RenewProperties *RenewPropertiesResponse `json:"renewProperties,omitempty"` } // PurchaseRequest ... @@ -1216,6 +1205,7 @@ type PurchaseRequestProperties struct { // AppliedScopeType - Possible values include: 'Single', 'Shared' AppliedScopeType AppliedScopeType `json:"appliedScopeType,omitempty"` AppliedScopes *[]string `json:"appliedScopes,omitempty"` + Renew *bool `json:"renew,omitempty"` // ReservedResourceProperties - Properties specific to each reserved resource type. Not required if not applicable. ReservedResourceProperties *PurchaseRequestPropertiesReservedResourceProperties `json:"reservedResourceProperties,omitempty"` } @@ -1227,6 +1217,30 @@ type PurchaseRequestPropertiesReservedResourceProperties struct { InstanceFlexibility InstanceFlexibility `json:"instanceFlexibility,omitempty"` } +// RenewPropertiesResponse ... +type RenewPropertiesResponse struct { + PurchaseProperties *PurchaseRequest `json:"purchaseProperties,omitempty"` + // LockedPriceTotal - Locked currency & amount for new reservation purchase at the time of renewal. Price is locked 30 days before expiry date time if renew is true. + LockedPriceTotal *RenewPropertiesResponseLockedPriceTotal `json:"lockedPriceTotal,omitempty"` + // Links - Contains prev and next reservation Ids' because of renewal. + Links *RenewPropertiesResponseLinks `json:"links,omitempty"` +} + +// RenewPropertiesResponseLinks contains prev and next reservation Ids' because of renewal. +type RenewPropertiesResponseLinks struct { + // RenewSource - Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + RenewSource *string `json:"renewSource,omitempty"` + // RenewDestination - Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. + RenewDestination *string `json:"renewDestination,omitempty"` +} + +// RenewPropertiesResponseLockedPriceTotal locked currency & amount for new reservation purchase at the +// time of renewal. Price is locked 30 days before expiry date time if renew is true. +type RenewPropertiesResponseLockedPriceTotal struct { + CurrencyCode *string `json:"currencyCode,omitempty"` + Amount *string `json:"amount,omitempty"` +} + // ReservationMergeFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ReservationMergeFuture struct { @@ -1237,7 +1251,7 @@ type ReservationMergeFuture struct { // If the operation has not completed it will return an error. func (future *ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", future.Response(), "Polling failure") return @@ -1266,7 +1280,7 @@ type ReservationUpdateFuture struct { // If the operation has not completed it will return an error. func (future *ReservationUpdateFuture) Result(client Client) (r Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", future.Response(), "Polling failure") return @@ -1288,16 +1302,16 @@ func (future *ReservationUpdateFuture) Result(client Client) (r Response, err er // Response ... type Response struct { autorest.Response `json:"-"` - // Location - The Azure Region where the reserved resource lives. + // Location - READ-ONLY; The Azure Region where the reserved resource lives. Location *string `json:"location,omitempty"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` Sku *SkuName `json:"sku,omitempty"` Properties *Properties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservationOrders/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservationOrders/reservations" Type *string `json:"type,omitempty"` } @@ -1333,7 +1347,7 @@ type SplitFuture struct { // If the operation has not completed it will return an error. func (future *SplitFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", future.Response(), "Polling failure") return diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go index 7ea4c3a4afef..ef79d833727c 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/reservation.go @@ -44,7 +44,8 @@ func NewClientWithBaseURI(baseURI string) Client { // Parameters: // reservationID - id of the Reservation Item // reservationOrderID - order Id of the reservation -func (client Client) Get(ctx context.Context, reservationID string, reservationOrderID string) (result Response, err error) { +// appendParameter - supported value of this query is renewProperties +func (client Client) Get(ctx context.Context, reservationID string, reservationOrderID string, appendParameter string) (result Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get") defer func() { @@ -55,7 +56,7 @@ func (client Client) Get(ctx context.Context, reservationID string, reservationO tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, reservationID, reservationOrderID) + req, err := client.GetPreparer(ctx, reservationID, reservationOrderID, appendParameter) if err != nil { err = autorest.NewErrorWithError(err, "reservations.Client", "Get", nil, "Failure preparing request") return @@ -77,7 +78,7 @@ func (client Client) Get(ctx context.Context, reservationID string, reservationO } // GetPreparer prepares the Get request. -func (client Client) GetPreparer(ctx context.Context, reservationID string, reservationOrderID string) (*http.Request, error) { +func (client Client) GetPreparer(ctx context.Context, reservationID string, reservationOrderID string, appendParameter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "reservationId": autorest.Encode("path", reservationID), "reservationOrderId": autorest.Encode("path", reservationOrderID), @@ -87,6 +88,9 @@ func (client Client) GetPreparer(ctx context.Context, reservationID string, rese queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(appendParameter) > 0 { + queryParameters["append"] = autorest.Encode("query", appendParameter) + } preparer := autorest.CreatePreparer( autorest.AsGet(), diff --git a/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go b/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go index fb7faec0646d..79cd246dd623 100644 --- a/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go +++ b/services/preview/reservations/mgmt/2019-04-01/reservations/reservationsapi/interfaces.go @@ -42,7 +42,7 @@ var _ OrderClientAPI = (*reservations.OrderClient)(nil) // ClientAPI contains the set of methods on the Client type. type ClientAPI interface { - Get(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.Response, err error) + Get(ctx context.Context, reservationID string, reservationOrderID string, appendParameter string) (result reservations.Response, err error) List(ctx context.Context, reservationOrderID string) (result reservations.ListPage, err error) ListRevisions(ctx context.Context, reservationID string, reservationOrderID string) (result reservations.ListPage, err error) Merge(ctx context.Context, reservationOrderID string, body reservations.MergeRequest) (result reservations.ReservationMergeFuture, err error) diff --git a/services/reservations/mgmt/2017-11-01/reservations/models.go b/services/reservations/mgmt/2017-11-01/reservations/models.go index fc1aa5d25441..d92918d48823 100644 --- a/services/reservations/mgmt/2017-11-01/reservations/models.go +++ b/services/reservations/mgmt/2017-11-01/reservations/models.go @@ -382,11 +382,11 @@ type AppliedReservationList struct { // AppliedReservations ... type AppliedReservations struct { autorest.Response `json:"-"` - // ID - Identifier of the applied reservations + // ID - READ-ONLY; Identifier of the applied reservations ID *string `json:"id,omitempty"` - // Name - Name of resource + // Name - READ-ONLY; Name of resource Name *string `json:"name,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/AppliedReservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/AppliedReservations" Type *string `json:"type,omitempty"` *AppliedReservationsProperties `json:"properties,omitempty"` } @@ -394,15 +394,6 @@ type AppliedReservations struct { // MarshalJSON is the custom marshaler for AppliedReservations. func (ar AppliedReservations) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ar.ID != nil { - objectMap["id"] = ar.ID - } - if ar.Name != nil { - objectMap["name"] = ar.Name - } - if ar.Type != nil { - objectMap["type"] = ar.Type - } if ar.AppliedReservationsProperties != nil { objectMap["properties"] = ar.AppliedReservationsProperties } @@ -467,18 +458,21 @@ type AppliedReservationsProperties struct { // Catalog ... type Catalog struct { - // ResourceType - The type of resource the SKU applies to. + // ResourceType - READ-ONLY; The type of resource the SKU applies to. ResourceType *string `json:"resourceType,omitempty"` - // Name - The name of SKU + // Name - READ-ONLY; The name of SKU Name *string `json:"name,omitempty"` - // Tier - The tier of this SKU + // Tier - READ-ONLY; The tier of this SKU Tier *string `json:"tier,omitempty"` - // Size - The size of this SKU + // Size - READ-ONLY; The size of this SKU Size *string `json:"size,omitempty"` - // Terms - Available reservation terms for this resource - Terms *[]string `json:"terms,omitempty"` - Locations *[]string `json:"locations,omitempty"` - Capabilities *[]SkuCapability `json:"capabilities,omitempty"` + // Terms - READ-ONLY; Available reservation terms for this resource + Terms *[]string `json:"terms,omitempty"` + // Locations - READ-ONLY + Locations *[]string `json:"locations,omitempty"` + // Capabilities - READ-ONLY + Capabilities *[]SkuCapability `json:"capabilities,omitempty"` + // Restrictions - READ-ONLY Restrictions *[]SkuRestriction `json:"restrictions,omitempty"` } @@ -1039,12 +1033,12 @@ type OrderProperties struct { type OrderResponse struct { autorest.Response `json:"-"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` *OrderProperties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservations" Type *string `json:"type,omitempty"` } @@ -1054,18 +1048,9 @@ func (or OrderResponse) MarshalJSON() ([]byte, error) { if or.Etag != nil { objectMap["etag"] = or.Etag } - if or.ID != nil { - objectMap["id"] = or.ID - } - if or.Name != nil { - objectMap["name"] = or.Name - } if or.OrderProperties != nil { objectMap["properties"] = or.OrderProperties } - if or.Type != nil { - objectMap["type"] = or.Type - } return json.Marshal(objectMap) } @@ -1187,7 +1172,7 @@ type Properties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // EffectiveDateTime - DateTime of the Reservation starting when this version is effective from. EffectiveDateTime *date.Time `json:"effectiveDateTime,omitempty"` - // LastUpdatedDateTime - DateTime of the last time the Reservation was updated. + // LastUpdatedDateTime - READ-ONLY; DateTime of the last time the Reservation was updated. LastUpdatedDateTime *date.Time `json:"lastUpdatedDateTime,omitempty"` // ExpiryDate - This is the date when the Reservation will expire. ExpiryDate *date.Date `json:"expiryDate,omitempty"` @@ -1206,7 +1191,7 @@ type ReservationMergeFuture struct { // If the operation has not completed it will return an error. func (future *ReservationMergeFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationMergeFuture", "Result", future.Response(), "Polling failure") return @@ -1235,7 +1220,7 @@ type ReservationUpdateFuture struct { // If the operation has not completed it will return an error. func (future *ReservationUpdateFuture) Result(client Client) (r Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.ReservationUpdateFuture", "Result", future.Response(), "Polling failure") return @@ -1260,15 +1245,15 @@ type Response struct { // Location - Possible values include: 'Westus', 'Eastus', 'Eastus2', 'Northcentralus', 'Westus2', 'Southcentralus', 'Centralus', 'Westeurope', 'Northeurope', 'Eastasia', 'Southeastasia', 'Japaneast', 'Japanwest', 'Brazilsouth', 'Australiaeast', 'Australiasoutheast', 'Southindia', 'Westindia', 'Centralindia', 'Canadacentral', 'Canadaeast', 'Uksouth', 'Westcentralus', 'Ukwest' Location Location `json:"location,omitempty"` Etag *int32 `json:"etag,omitempty"` - // ID - Identifier of the reservation + // ID - READ-ONLY; Identifier of the reservation ID *string `json:"id,omitempty"` - // Name - Name of the reservation + // Name - READ-ONLY; Name of the reservation Name *string `json:"name,omitempty"` // Kind - Resource Provider type to be reserved. Possible values include: 'MicrosoftCompute' Kind Kind `json:"kind,omitempty"` Sku *SkuName `json:"sku,omitempty"` Properties *Properties `json:"properties,omitempty"` - // Type - Type of resource. "Microsoft.Capacity/reservationOrders/reservations" + // Type - READ-ONLY; Type of resource. "Microsoft.Capacity/reservationOrders/reservations" Type *string `json:"type,omitempty"` } @@ -1304,7 +1289,7 @@ type SplitFuture struct { // If the operation has not completed it will return an error. func (future *SplitFuture) Result(client Client) (lr ListResponse, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "reservations.SplitFuture", "Result", future.Response(), "Polling failure") return