/// <summary>
 /// Initializes a new instance of the RecommendedAction class.
 /// </summary>
 /// <param name="state">Gets the info of the current state the
 /// recommended action is in.</param>
 /// <param name="id">Resource ID.</param>
 /// <param name="name">Resource name.</param>
 /// <param name="type">Resource type.</param>
 /// <param name="kind">Resource kind.</param>
 /// <param name="location">Resource location.</param>
 /// <param name="recommendationReason">Gets the reason for recommending
 /// this action. e.g., DuplicateIndex</param>
 /// <param name="validSince">Gets the time since when this recommended
 /// action is valid.</param>
 /// <param name="lastRefresh">Gets time when this recommended action
 /// was last refreshed.</param>
 /// <param name="isExecutableAction">Gets if this recommended action is
 /// actionable by user</param>
 /// <param name="isRevertableAction">Gets if changes applied by this
 /// recommended action can be reverted by user</param>
 /// <param name="isArchivedAction">Gets if this recommended action was
 /// suggested some time ago but user chose to ignore this and system
 /// added a new recommended action again.</param>
 /// <param name="executeActionStartTime">Gets the time when system
 /// started applying this recommended action on the user resource.
 /// e.g., index creation start time</param>
 /// <param name="executeActionDuration">Gets the time taken for
 /// applying this recommended action on user resource. e.g., time taken
 /// for index creation</param>
 /// <param name="revertActionStartTime">Gets the time when system
 /// started reverting changes of this recommended action on user
 /// resource. e.g., time when index drop is executed.</param>
 /// <param name="revertActionDuration">Gets the time taken for
 /// reverting changes of this recommended action on user resource.
 /// e.g., time taken for dropping the created index.</param>
 /// <param name="executeActionInitiatedBy">Gets if approval for
 /// applying this recommended action was given by user/system. Possible
 /// values include: 'User', 'System'</param>
 /// <param name="executeActionInitiatedTime">Gets the time when this
 /// recommended action was approved for execution.</param>
 /// <param name="revertActionInitiatedBy">Gets if approval for
 /// reverting this recommended action was given by user/system.
 /// Possible values include: 'User', 'System'</param>
 /// <param name="revertActionInitiatedTime">Gets the time when this
 /// recommended action was approved for revert.</param>
 /// <param name="score">Gets the impact of this recommended action.
 /// Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High
 /// Impact</param>
 /// <param name="implementationDetails">Gets the implementation details
 /// of this recommended action for user to apply it manually.</param>
 /// <param name="errorDetails">Gets the error details if and why this
 /// recommended action is put to error state.</param>
 /// <param name="estimatedImpact">Gets the estimated impact info for
 /// this recommended action e.g., Estimated CPU gain, Estimated Disk
 /// Space change</param>
 /// <param name="observedImpact">Gets the observed/actual impact info
 /// for this recommended action e.g., Actual CPU gain, Actual Disk
 /// Space change</param>
 /// <param name="timeSeries">Gets the time series info of metrics for
 /// this recommended action e.g., CPU consumption time series</param>
 /// <param name="linkedObjects">Gets the linked objects, if
 /// any.</param>
 /// <param name="details">Gets additional details specific to this
 /// recommended action.</param>
 public RecommendedAction(RecommendedActionStateInfo state, string id = default(string), string name = default(string), string type = default(string), string kind = default(string), string location = default(string), string recommendationReason = default(string), System.DateTime?validSince = default(System.DateTime?), System.DateTime?lastRefresh = default(System.DateTime?), bool?isExecutableAction = default(bool?), bool?isRevertableAction = default(bool?), bool?isArchivedAction = default(bool?), System.DateTime?executeActionStartTime = default(System.DateTime?), string executeActionDuration = default(string), System.DateTime?revertActionStartTime = default(System.DateTime?), string revertActionDuration = default(string), RecommendedActionInitiatedBy?executeActionInitiatedBy = default(RecommendedActionInitiatedBy?), System.DateTime?executeActionInitiatedTime = default(System.DateTime?), RecommendedActionInitiatedBy?revertActionInitiatedBy = default(RecommendedActionInitiatedBy?), System.DateTime?revertActionInitiatedTime = default(System.DateTime?), int?score = default(int?), RecommendedActionImplementationInfo implementationDetails = default(RecommendedActionImplementationInfo), RecommendedActionErrorInfo errorDetails = default(RecommendedActionErrorInfo), IList <RecommendedActionImpactRecord> estimatedImpact = default(IList <RecommendedActionImpactRecord>), IList <RecommendedActionImpactRecord> observedImpact = default(IList <RecommendedActionImpactRecord>), IList <RecommendedActionMetricInfo> timeSeries = default(IList <RecommendedActionMetricInfo>), IList <string> linkedObjects = default(IList <string>), IDictionary <string, object> details = default(IDictionary <string, object>))
     : base(id, name, type)
 {
     Kind                       = kind;
     Location                   = location;
     RecommendationReason       = recommendationReason;
     ValidSince                 = validSince;
     LastRefresh                = lastRefresh;
     State                      = state;
     IsExecutableAction         = isExecutableAction;
     IsRevertableAction         = isRevertableAction;
     IsArchivedAction           = isArchivedAction;
     ExecuteActionStartTime     = executeActionStartTime;
     ExecuteActionDuration      = executeActionDuration;
     RevertActionStartTime      = revertActionStartTime;
     RevertActionDuration       = revertActionDuration;
     ExecuteActionInitiatedBy   = executeActionInitiatedBy;
     ExecuteActionInitiatedTime = executeActionInitiatedTime;
     RevertActionInitiatedBy    = revertActionInitiatedBy;
     RevertActionInitiatedTime  = revertActionInitiatedTime;
     Score                      = score;
     ImplementationDetails      = implementationDetails;
     ErrorDetails               = errorDetails;
     EstimatedImpact            = estimatedImpact;
     ObservedImpact             = observedImpact;
     TimeSeries                 = timeSeries;
     LinkedObjects              = linkedObjects;
     Details                    = details;
     CustomInit();
 }
        /// <summary>
        /// Compares ErrorInfo details of recommendation action entity
        /// </summary>
        private static void CompareRecommendedActionErrorInfo(RecommendedActionErrorInfo expected, RecommendedActionErrorInfo response)
        {
            Assert.False(expected != null ^ response != null);

            if (response != null)
            {
                Assert.Equal(expected.ErrorCode, response.ErrorCode);
                Assert.Equal(expected.IsRetryable, response.IsRetryable);
            }
        }