diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go index df3c8cb20087..49c600d84d48 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go @@ -1179,6 +1179,25 @@ func PossiblePresenceStatusValues() []PresenceStatus { return []PresenceStatus{NotPresent, Present, Unknown} } +// ProtectionHealth enumerates the values for protection health. +type ProtectionHealth string + +const ( + // ProtectionHealthCritical ... + ProtectionHealthCritical ProtectionHealth = "Critical" + // ProtectionHealthNone ... + ProtectionHealthNone ProtectionHealth = "None" + // ProtectionHealthNormal ... + ProtectionHealthNormal ProtectionHealth = "Normal" + // ProtectionHealthWarning ... + ProtectionHealthWarning ProtectionHealth = "Warning" +) + +// PossibleProtectionHealthValues returns an array of possible values for the ProtectionHealth const type. +func PossibleProtectionHealthValues() []ProtectionHealth { + return []ProtectionHealth{ProtectionHealthCritical, ProtectionHealthNone, ProtectionHealthNormal, ProtectionHealthWarning} +} + // RecoveryPlanActionLocation enumerates the values for recovery plan action location. type RecoveryPlanActionLocation string @@ -9362,6 +9381,8 @@ type InMageAzureV2ReplicationDetails struct { LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` // ProcessServerID - The process server Id. ProcessServerID *string `json:"processServerId,omitempty"` + // ProcessServerName - READ-ONLY; The process server name. + ProcessServerName *string `json:"processServerName,omitempty"` // MultiVMGroupID - The multi vm group Id. MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` // MultiVMGroupName - The multi vm group name. @@ -13668,6 +13689,22 @@ type ProcessServer struct { AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` // AgentVersionDetails - The agent version details. AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` + // Health - READ-ONLY; The health of Process Server. Possible values include: 'ProtectionHealthNone', 'ProtectionHealthNormal', 'ProtectionHealthWarning', 'ProtectionHealthCritical' + Health ProtectionHealth `json:"health,omitempty"` + // PsStatsRefreshTime - READ-ONLY; The process server stats refresh time. + PsStatsRefreshTime *date.Time `json:"psStatsRefreshTime,omitempty"` + // ThroughputUploadPendingDataInBytes - READ-ONLY; The uploading pending data in bytes. + ThroughputUploadPendingDataInBytes *int64 `json:"throughputUploadPendingDataInBytes,omitempty"` + // ThroughputInMBps - READ-ONLY; The throughput in MBps. + ThroughputInMBps *int64 `json:"throughputInMBps,omitempty"` + // ThroughputInBytes - READ-ONLY; The throughput in bytes. + ThroughputInBytes *int64 `json:"throughputInBytes,omitempty"` + // ThroughputStatus - READ-ONLY; The throughput status. + ThroughputStatus *string `json:"throughputStatus,omitempty"` + // MarsCommunicationStatus - READ-ONLY; The MARS communication status. + MarsCommunicationStatus *string `json:"marsCommunicationStatus,omitempty"` + // MarsRegistrationStatus - READ-ONLY; The MARS registration status. + MarsRegistrationStatus *string `json:"marsRegistrationStatus,omitempty"` } // ProtectableItem replication protected item @@ -17077,64 +17114,6 @@ type ReplicationEligibilityResultsErrorInfo struct { Status *string `json:"status,omitempty"` } -// ReplicationEligibilityResultsGetFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ReplicationEligibilityResultsGetFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ReplicationEligibilityResultsGetFuture) Result(client ReplicationEligibilityResultsClient) (rer ReplicationEligibilityResults, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsGetFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationEligibilityResultsGetFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rer.Response.Response, err = future.GetResult(sender); err == nil && rer.Response.Response.StatusCode != http.StatusNoContent { - rer, err = client.GetResponder(rer.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsGetFuture", "Result", rer.Response.Response, "Failure responding to request") - } - } - return -} - -// ReplicationEligibilityResultsListFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ReplicationEligibilityResultsListFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ReplicationEligibilityResultsListFuture) Result(client ReplicationEligibilityResultsClient) (rerc ReplicationEligibilityResultsCollection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsListFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationEligibilityResultsListFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rerc.Response.Response, err = future.GetResult(sender); err == nil && rerc.Response.Response.StatusCode != http.StatusNoContent { - rerc, err = client.ListResponder(rerc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsListFuture", "Result", rerc.Response.Response, "Failure responding to request") - } - } - return -} - // ReplicationEligibilityResultsProperties properties model for replication eligibility results API. type ReplicationEligibilityResultsProperties struct { // ClientRequestID - READ-ONLY; The client request Id. @@ -20997,6 +20976,8 @@ type TargetComputeSizeProperties struct { FriendlyName *string `json:"friendlyName,omitempty"` // CPUCoresCount - The maximum cpu cores count supported by target compute size. CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"` + // VCPUsAvailable - READ-ONLY; The Available vCPUs supported by target compute size. + VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"` // MemoryInGB - The maximum memory in GB supported by target compute size. MemoryInGB *float64 `json:"memoryInGB,omitempty"` // MaxDataDiskCount - The maximum data disks count supported by target compute size. @@ -21007,6 +20988,8 @@ type TargetComputeSizeProperties struct { Errors *[]ComputeSizeErrorDetails `json:"errors,omitempty"` // HighIopsSupported - The value indicating whether the target compute size supports high Iops. HighIopsSupported *string `json:"highIopsSupported,omitempty"` + // HyperVGenerations - READ-ONLY; The supported HyperV Generations. + HyperVGenerations *[]string `json:"hyperVGenerations,omitempty"` } // BasicTaskTypeDetails task details based on specific task type. diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go index 90847fa726fa..86992c42435f 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go @@ -46,13 +46,13 @@ func NewReplicationEligibilityResultsClientWithBaseURI(baseURI string, subscript // Get validates whether a given VM can be protected or not in which case returns list of errors. // Parameters: // virtualMachineName - virtual Machine name. -func (client ReplicationEligibilityResultsClient) Get(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResultsGetFuture, err error) { +func (client ReplicationEligibilityResultsClient) Get(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResults, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEligibilityResultsClient.Get") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -63,12 +63,18 @@ func (client ReplicationEligibilityResultsClient) Get(ctx context.Context, virtu return } - result, err = client.GetSender(req) + resp, err := client.GetSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "Get", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "Get", resp, "Failure sending request") return } + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "Get", resp, "Failure responding to request") + } + return } @@ -95,14 +101,8 @@ func (client ReplicationEligibilityResultsClient) GetPreparer(ctx context.Contex // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client ReplicationEligibilityResultsClient) GetSender(req *http.Request) (future ReplicationEligibilityResultsGetFuture, err error) { - var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return +func (client ReplicationEligibilityResultsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -121,13 +121,13 @@ func (client ReplicationEligibilityResultsClient) GetResponder(resp *http.Respon // List validates whether a given VM can be protected or not in which case returns list of errors. // Parameters: // virtualMachineName - virtual Machine name. -func (client ReplicationEligibilityResultsClient) List(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResultsListFuture, err error) { +func (client ReplicationEligibilityResultsClient) List(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResultsCollection, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEligibilityResultsClient.List") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -138,12 +138,18 @@ func (client ReplicationEligibilityResultsClient) List(ctx context.Context, virt return } - result, err = client.ListSender(req) + resp, err := client.ListSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "List", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "List", resp, "Failure sending request") return } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "List", resp, "Failure responding to request") + } + return } @@ -170,14 +176,8 @@ func (client ReplicationEligibilityResultsClient) ListPreparer(ctx context.Conte // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ReplicationEligibilityResultsClient) ListSender(req *http.Request) (future ReplicationEligibilityResultsListFuture, err error) { - var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return +func (client ReplicationEligibilityResultsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go index 7d2c93d89d77..a23936eaa0f0 100644 --- a/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go @@ -42,8 +42,8 @@ var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSetting // ReplicationEligibilityResultsClientAPI contains the set of methods on the ReplicationEligibilityResultsClient type. type ReplicationEligibilityResultsClientAPI interface { - Get(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResultsGetFuture, err error) - List(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResultsListFuture, err error) + Get(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResults, err error) + List(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResultsCollection, err error) } var _ ReplicationEligibilityResultsClientAPI = (*siterecovery.ReplicationEligibilityResultsClient)(nil)