// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
// SPDX-License-Identifier: Apache-2.0
using System;
using System.Collections.Generic;
using AWS.Deploy.Common.Recipes;
namespace AWS.Deploy.CLI.ServerMode.Models
{
public class OptionSettingItemSummary
{
///
/// The unique id of setting. This value will be persisted in other config files so its value should never change once a recipe is released.
///
public string Id { get; set; }
///
/// The fully qualified id of the setting that includes the Id and all of the parent's Ids.
/// This helps easily reference the Option Setting without context of the parent setting.
///
public string FullyQualifiedId { get; set; }
///
/// The display friendly name of the setting.
///
public string Name { get; set; }
///
/// The category for the setting. This value must match an id field in the list of categories.
///
public string? Category { get; set; }
///
/// The description of what the setting is used for.
///
public string Description { get; set; }
///
/// The value used for the recipe if it is set by the user.
///
public object? Value { get; set; }
///
/// The type of primitive value expected for this setting.
/// For example String, Int
///
public string Type { get; set; }
///
/// Hint the the UI what type of setting this is optionally add additional UI features to select a value.
/// For example a value of BeanstalkApplication tells the UI it can display the list of available Beanstalk applications for the user to pick from.
///
public string? TypeHint { get; set; }
///
/// Type hint additional data required to facilitate handling of the option setting.
///
public Dictionary TypeHintData { get; set; } = new(StringComparer.OrdinalIgnoreCase);
///
/// UI can use this to reduce the amount of settings to show to the user when confirming the recommendation. This can make it so the user sees only the most important settings
/// they need to know about before deploying.
///
public bool Advanced { get; set; }
///
/// Indicates whether the setting can be edited
///
public bool ReadOnly { get; set; }
///
/// Indicates whether the setting is visible/displayed on the UI
///
public bool Visible { get; set; }
///
/// Indicates whether the setting can be displayed as part of the settings summary of the previous deployment.
///
public bool SummaryDisplayable { get; set; }
///
/// The allowed values for the setting.
///
public IList AllowedValues { get; set; } = new List();
///
/// The value mapping for allowed values. The key of the dictionary is what is sent to services
/// and the value is the display value shown to users.
///
public IDictionary ValueMapping { get; set; } = new Dictionary(StringComparer.OrdinalIgnoreCase);
///
/// Child option settings for value types
/// value depends on the values of
///
public List ChildOptionSettings { get; set; } = new();
///
/// The validation state of the setting that contains the validation status and message.
///
public OptionSettingValidation Validation { get; set; }
public OptionSettingItemSummary(string id, string fullyQualifiedId, string name, string description, string type)
{
Id = id;
FullyQualifiedId = fullyQualifiedId;
Name = name;
Description = description;
Type = type;
Validation = new OptionSettingValidation();
}
}
}