/// <summary>
 /// Initializes a new instance of the PrivateLinkServiceConnectionState
 /// class.
 /// </summary>
 /// <param name="status">The status for the private endpoint connection
 /// of Batch account</param>
 /// <param name="description">Description of the private Connection
 /// state</param>
 /// <param name="actionRequired">Action required on the private
 /// connection state</param>
 public PrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStatus status, string description = default(string), string actionRequired = default(string))
 {
     Status         = status;
     Description    = description;
     ActionRequired = actionRequired;
     CustomInit();
 }
Exemple #2
0
        internal static string ToSerializedValue(this PrivateLinkServiceConnectionStatus value)
        {
            switch (value)
            {
            case PrivateLinkServiceConnectionStatus.Approved:
                return("Approved");

            case PrivateLinkServiceConnectionStatus.Pending:
                return("Pending");

            case PrivateLinkServiceConnectionStatus.Rejected:
                return("Rejected");

            case PrivateLinkServiceConnectionStatus.Disconnected:
                return("Disconnected");
            }
            return(null);
        }
        public virtual void UpdatePrivateEndpointConnection(string resourceGroup, string accountName, string name, PrivateLinkServiceConnectionStatus status, string description)
        {
            if (resourceGroup == null)
            {
                throw new ArgumentNullException(nameof(resourceGroup));
            }
            if (accountName == null)
            {
                throw new ArgumentNullException(nameof(accountName));
            }
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            var connection = new PrivateEndpointConnection(
                name: name,
                privateLinkServiceConnectionState: new PrivateLinkServiceConnectionState(
                    status: status,
                    description: description));

            BatchManagementClient.PrivateEndpointConnection.Update(resourceGroup, accountName, name, connection);
        }
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="PrivateLinkServiceConnectionStatus" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateLinkServiceConnectionStatus.CreateFrom(sourceValue);