Exemple #1
0
        internal static string ToSerializedValue(this NotAllowedBlockActionReason value)
        {
            switch (value)
            {
            case NotAllowedBlockActionReason.DeleteNotAllowedForBlockWithReservations:
                return("DeleteNotAllowedForBlockWithReservations");

            case NotAllowedBlockActionReason.ReleaseNotAllowedForBlockWithReservations:
                return("ReleaseNotAllowedForBlockWithReservations");

            case NotAllowedBlockActionReason.ReleaseNotAllowedForBlockInThePast:
                return("ReleaseNotAllowedForBlockInThePast");

            case NotAllowedBlockActionReason.ReleaseNotAllowedForBlockNotInStatusDefinite:
                return("ReleaseNotAllowedForBlockNotInStatusDefinite");

            case NotAllowedBlockActionReason.ConfirmNotAllowedForBlockNotInStatusTentative:
                return("ConfirmNotAllowedForBlockNotInStatusTentative");

            case NotAllowedBlockActionReason.ConfirmNotAllowedForBlockInThePast:
                return("ConfirmNotAllowedForBlockInThePast");

            case NotAllowedBlockActionReason.CancelNotAllowedForBlockWithNotCancelledReservations:
                return("CancelNotAllowedForBlockWithNotCancelledReservations");

            case NotAllowedBlockActionReason.CancelNotAllowedForBlockNotInStatusDefiniteOrTentative:
                return("CancelNotAllowedForBlockNotInStatusDefiniteOrTentative");

            case NotAllowedBlockActionReason.PickupNotAllowedForBlockNotInStatusDefinite:
                return("PickupNotAllowedForBlockNotInStatusDefinite");

            case NotAllowedBlockActionReason.PickupNotAllowedForBlockInThePast:
                return("PickupNotAllowedForBlockInThePast");

            case NotAllowedBlockActionReason.PickupNotAllowedForFullyPickedBlock:
                return("PickupNotAllowedForFullyPickedBlock");

            case NotAllowedBlockActionReason.ModifyNotAllowedForBlockInThePast:
                return("ModifyNotAllowedForBlockInThePast");

            case NotAllowedBlockActionReason.ModifyNotAllowedForBlockInStatusCanceled:
                return("ModifyNotAllowedForBlockInStatusCanceled");

            case NotAllowedBlockActionReason.WashNotAllowedForBlockNotInStatusDefinite:
                return("WashNotAllowedForBlockNotInStatusDefinite");

            case NotAllowedBlockActionReason.WashNotAllowedForBlockWithoutReservations:
                return("WashNotAllowedForBlockWithoutReservations");
            }
            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the
 /// ActionReasonModelNotAllowedBlockActionReason class.
 /// </summary>
 /// <param name="code">Possible values include:
 /// 'DeleteNotAllowedForBlockWithReservations',
 /// 'ReleaseNotAllowedForBlockWithReservations',
 /// 'ReleaseNotAllowedForBlockInThePast',
 /// 'ReleaseNotAllowedForBlockNotInStatusDefinite',
 /// 'ConfirmNotAllowedForBlockNotInStatusTentative',
 /// 'ConfirmNotAllowedForBlockInThePast',
 /// 'CancelNotAllowedForBlockWithNotCancelledReservations',
 /// 'CancelNotAllowedForBlockNotInStatusDefiniteOrTentative',
 /// 'PickupNotAllowedForBlockNotInStatusDefinite',
 /// 'PickupNotAllowedForBlockInThePast',
 /// 'PickupNotAllowedForFullyPickedBlock',
 /// 'ModifyNotAllowedForBlockInThePast',
 /// 'ModifyNotAllowedForBlockInStatusCanceled',
 /// 'WashNotAllowedForBlockNotInStatusDefinite',
 /// 'WashNotAllowedForBlockWithoutReservations'</param>
 public ActionReasonModelNotAllowedBlockActionReason(NotAllowedBlockActionReason code, string message)
 {
     Code    = code;
     Message = message;
     CustomInit();
 }