// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // #nullable disable using System; using System.Collections.Generic; using Azure.ResourceManager.MongoCluster; namespace Azure.ResourceManager.MongoCluster.Models { /// The updatable properties of the MongoCluster. public partial class MongoClusterUpdateProperties { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public MongoClusterUpdateProperties() { PreviewFeatures = new ChangeTrackingList(); } /// Initializes a new instance of . /// The local administrator properties for the mongo cluster. /// The Mongo DB server version. Defaults to the latest available version if not specified. /// Whether or not public endpoint access is allowed for this mongo cluster. /// The high availability properties of the mongo cluster. /// The storage properties of the mongo cluster. /// The sharding properties of the mongo cluster. /// The compute properties of the mongo cluster. /// The backup properties of the mongo cluster. /// The Data API properties of the mongo cluster. /// List of private endpoint connections. /// The authentication configuration for the cluster. /// The encryption configuration for the cluster. Depends on identity being configured. /// The network bypass mode for the cluster. Setting to 'AzureCosmosDB' allows Azure Cosmos DB service to bypass network restrictions. /// Keeps track of any properties unknown to the library. internal MongoClusterUpdateProperties(MongoClusterAdministratorProperties administrator, string serverVersion, MongoClusterPublicNetworkAccess? publicNetworkAccess, HighAvailabilityProperties highAvailability, MongoClusterStorageProperties storage, ShardingProperties sharding, ComputeProperties compute, BackupProperties backup, DataApiProperties dataApi, IList previewFeatures, AuthConfigProperties authConfig, EncryptionProperties encryption, MongoClusterNetworkBypassMode? networkBypassMode, IDictionary additionalBinaryDataProperties) { Administrator = administrator; ServerVersion = serverVersion; PublicNetworkAccess = publicNetworkAccess; HighAvailability = highAvailability; Storage = storage; Sharding = sharding; Compute = compute; Backup = backup; DataApi = dataApi; PreviewFeatures = previewFeatures; AuthConfig = authConfig; Encryption = encryption; NetworkBypassMode = networkBypassMode; _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// The local administrator properties for the mongo cluster. public MongoClusterAdministratorProperties Administrator { get; set; } /// The Mongo DB server version. Defaults to the latest available version if not specified. public string ServerVersion { get; set; } /// Whether or not public endpoint access is allowed for this mongo cluster. public MongoClusterPublicNetworkAccess? PublicNetworkAccess { get; set; } /// The high availability properties of the mongo cluster. internal HighAvailabilityProperties HighAvailability { get; set; } /// The storage properties of the mongo cluster. public MongoClusterStorageProperties Storage { get; set; } /// The sharding properties of the mongo cluster. internal ShardingProperties Sharding { get; set; } /// The compute properties of the mongo cluster. internal ComputeProperties Compute { get; set; } /// The backup properties of the mongo cluster. internal BackupProperties Backup { get; set; } /// The Data API properties of the mongo cluster. internal DataApiProperties DataApi { get; set; } /// List of private endpoint connections. public IList PreviewFeatures { get; } /// The authentication configuration for the cluster. internal AuthConfigProperties AuthConfig { get; set; } /// The encryption configuration for the cluster. Depends on identity being configured. internal EncryptionProperties Encryption { get; set; } /// The network bypass mode for the cluster. Setting to 'AzureCosmosDB' allows Azure Cosmos DB service to bypass network restrictions. public MongoClusterNetworkBypassMode? NetworkBypassMode { get; set; } /// The target high availability mode requested for the cluster. public HighAvailabilityMode? HighAvailabilityTargetMode { get { return HighAvailability is null ? default : HighAvailability.TargetMode; } set { if (HighAvailability is null) { HighAvailability = new HighAvailabilityProperties(); } HighAvailability.TargetMode = value; } } /// Number of shards to provision on the cluster. public int? ShardingShardCount { get { return Sharding is null ? default : Sharding.ShardCount; } set { if (Sharding is null) { Sharding = new ShardingProperties(); } Sharding.ShardCount = value; } } /// The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory size. Example values: 'M30', 'M40'. public string ComputeTier { get { return Compute is null ? default : Compute.Tier; } set { if (Compute is null) { Compute = new ComputeProperties(); } Compute.Tier = value; } } /// Earliest restore timestamp in UTC ISO8601 format. public string BackupEarliestRestoreTime { get { return Backup is null ? default : Backup.EarliestRestoreTime; } } /// The mode to indicate whether the Mongo Data API is enabled for a cluster. public MongoClusterDataApiMode? DataApiMode { get { return DataApi is null ? default : DataApi.Mode; } set { if (DataApi is null) { DataApi = new DataApiProperties(); } DataApi.Mode = value; } } /// Allowed authentication modes for data access on the cluster. public IList AuthConfigAllowedModes { get { if (AuthConfig is null) { AuthConfig = new AuthConfigProperties(); } return AuthConfig.AllowedModes; } } /// Customer managed key encryption settings. public MongoClusterCmkEncryptionProperties CustomerManagedKeyEncryption { get { return Encryption is null ? default : Encryption.CustomerManagedKeyEncryption; } set { if (Encryption is null) { Encryption = new EncryptionProperties(); } Encryption.CustomerManagedKeyEncryption = value; } } } }