/// <summary>
 /// Initializes a new instance of the <see cref="SnmpTrap" /> class.
 /// </summary>
 /// <param name="Destination">Address to which the SNMP trap information is sent  .</param>
 /// <param name="Enabled">Enables/disables the trap on the server If enabled, trap us active on the server.  .</param>
 /// <param name="Port">Port used by the server to communicate with trap destination. Enter a value between 1-65535.  .</param>
 /// <param name="Type">Type of trap which decides whether to receive a notification when a trap is received at the destination   (default to TypeEnum.Trap).</param>
 /// <param name="User">SNMP user for the trap. Applicable only to SNMPv3  .</param>
 /// <param name="Version">SNMP version used for the trap    (default to VersionEnum.V3).</param>
 public SnmpTrap(string Destination = default(string), bool?Enabled = default(bool?), long?Port = default(long?), TypeEnum?Type = TypeEnum.Trap, string User = default(string), VersionEnum?Version = VersionEnum.V3)
 {
     this.Destination = Destination;
     this.Enabled     = Enabled;
     this.Port        = Port;
     // use default value if no "Type" provided
     if (Type == null)
     {
         this.Type = TypeEnum.Trap;
     }
     else
     {
         this.Type = Type;
     }
     this.User = User;
     // use default value if no "Version" provided
     if (Version == null)
     {
         this.Version = VersionEnum.V3;
     }
     else
     {
         this.Version = Version;
     }
 }
Beispiel #2
0
        protected BaseService(
            ILeagueApiConfiguration apiConfiguration,
            VersionEnum version,
            string prefix,
            bool isLimitedByRateLimit = true)
        {
            if (apiConfiguration == null)
            {
                throw new ArgumentNullException("apiConfiguration");
            }
            if (prefix == null)
            {
                throw new ArgumentNullException("prefix");
            }

            _apiConfiguration = apiConfiguration;

            _version = version;
            Prefix   = prefix;
            _isLimitedByRateLimit = isLimitedByRateLimit;

            if (!LastRequests.ContainsKey(_apiConfiguration.Key))
            {
                LastRequests[_apiConfiguration.Key] = new List <DateTime>();
            }

            AutoMapperService = new AutoMapperService(apiConfiguration);

            AutoMapperService.CreateMap <long, DateTime>()
            .ConvertUsing(x => new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(x));
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Secure3DAuthenticationResponse" /> class.
 /// </summary>
 /// <param name="type">The type of authentication..</param>
 /// <param name="version">The version of 3DS used to authenticate..</param>
 /// <param name="_params">_params.</param>
 /// <param name="secure3dMethod">secure3dMethod.</param>
 public Secure3DAuthenticationResponse(TypeEnum?type = null, VersionEnum?version = null, Secure3DAuthenticationResponseParams _params = default(Secure3DAuthenticationResponseParams), Secure3DAuthenticationResponseSecure3dMethod secure3dMethod = default(Secure3DAuthenticationResponseSecure3dMethod))
 {
     this.Type           = type;
     this.Version        = version;
     this.Params         = _params;
     this.Secure3dMethod = secure3dMethod;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonApiVersionJsonapi" /> class.
 /// </summary>
 /// <param name="Version">Version (required).</param>
 public JsonApiVersionJsonapi(VersionEnum?Version = null)
 {
     // to ensure "Version" is required (not null)
     if (Version == null)
     {
         throw new InvalidDataException("Version is a required property for JsonApiVersionJsonapi and cannot be null");
     }
     else
     {
         this.Version = Version;
     }
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EncryptedApplePay" /> class.
 /// </summary>
 /// <param name="data">The encrypted wallet payload. (required).</param>
 /// <param name="header">header (required).</param>
 /// <param name="signature">Signature of the payment and header data. (required).</param>
 /// <param name="version">Version information about the payment token..</param>
 /// <param name="applicationData">Base64-encoded value of PKPaymentRequest. Required only if applicationDataHash is present..</param>
 /// <param name="merchantId">The merchant ID assigned by the wallet provider. (required).</param>
 public EncryptedApplePay(string data = default(string), EncryptedApplePayHeader header = default(EncryptedApplePayHeader), string signature = default(string), VersionEnum?version = null, string applicationData = default(string), string merchantId = default(string))
 {
     // to ensure "data" is required (not null)
     this.Data = data ?? throw new ArgumentNullException("data is a required property for EncryptedApplePay and cannot be null");
     // to ensure "header" is required (not null)
     this.Header = header ?? throw new ArgumentNullException("header is a required property for EncryptedApplePay and cannot be null");
     // to ensure "signature" is required (not null)
     this.Signature = signature ?? throw new ArgumentNullException("signature is a required property for EncryptedApplePay and cannot be null");
     // to ensure "merchantId" is required (not null)
     this.MerchantId      = merchantId ?? throw new ArgumentNullException("merchantId is a required property for EncryptedApplePay and cannot be null");
     this.Version         = version;
     this.ApplicationData = applicationData;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QrCodeWatermarkData" /> class.
 /// </summary>
 /// <param name="SourceFileName">Optional file name (for logging purposes).</param>
 /// <param name="UseAsyncPattern">Use async behaviour for API request (default to false).</param>
 /// <param name="SourceFileContent">Content of the file to watermark (required).</param>
 /// <param name="Content">Data to embed in the QR Code (required).</param>
 /// <param name="SharepointFile">SharepointFile.</param>
 /// <param name="Version">Version (required) (default to VersionEnum.Auto).</param>
 /// <param name="InputMode">Input mode (required) (default to InputModeEnum.Binary).</param>
 /// <param name="ErrorCorrectionLevel">Error correction level (required) (default to ErrorCorrectionLevelEnum.Low).</param>
 /// <param name="Position">Watermark position on the page (required) (default to PositionEnum.MiddleCenter).</param>
 /// <param name="Width">Width of the watermark (in Pts, 1/72 of an inch) (required).</param>
 /// <param name="Height">Height of the watermark (in Pts, 1/72 of an inch) (required).</param>
 /// <param name="X">X Coordinate of the watermark (in Pts, 1/72 of an inch).</param>
 /// <param name="Y">Y Coordinate of the watermark (in Pts, 1/72 of an inch).</param>
 /// <param name="Layer">Watermark layer (default to LayerEnum.Foreground).</param>
 /// <param name="Rotation">Angle of rotation.</param>
 /// <param name="Opacity">Opacity in % (100 is fully visible and 1 is barely visible) (default to &quot;100&quot;).</param>
 /// <param name="FillColor">Color in #RRGGBB notation.</param>
 /// <param name="LineColor">Color in #RRGGBB notation.</param>
 /// <param name="StartPage">Number of the first page the watermark applies to.</param>
 /// <param name="EndPage">Number of the last page the watermark applies to.</param>
 /// <param name="PageInterval">Which pages to display the watermark on (1&#x3D;every page, 2&#x3D;every other, etc).</param>
 /// <param name="PageOrientation">Orientation of pages the watermark applies to. (default to PageOrientationEnum.Both).</param>
 /// <param name="FailOnError">Fail on error (default to true).</param>
 public QrCodeWatermarkData(string SourceFileName = default(string), bool?UseAsyncPattern = false, byte[] SourceFileContent = default(byte[]), string Content = default(string), SharepointFile SharepointFile = default(SharepointFile), VersionEnum?Version = VersionEnum.Auto, InputModeEnum?InputMode = InputModeEnum.Binary, ErrorCorrectionLevelEnum?ErrorCorrectionLevel = ErrorCorrectionLevelEnum.Low, PositionEnum?Position = PositionEnum.MiddleCenter, string Width = default(string), string Height = default(string), string X = default(string), string Y = default(string), LayerEnum?Layer = LayerEnum.Foreground, string Rotation = default(string), string Opacity = "100", string FillColor = default(string), string LineColor = default(string), int?StartPage = default(int?), int?EndPage = default(int?), int?PageInterval = default(int?), PageOrientationEnum?PageOrientation = PageOrientationEnum.Both, bool?FailOnError = true)
 {
     // to ensure "SourceFileContent" is required (not null)
     if (SourceFileContent == null)
     {
         throw new InvalidDataException("SourceFileContent is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.SourceFileContent = SourceFileContent;
     }
     // to ensure "Content" is required (not null)
     if (Content == null)
     {
         throw new InvalidDataException("Content is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.Content = Content;
     }
     // to ensure "Version" is required (not null)
     if (Version == null)
     {
         throw new InvalidDataException("Version is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.Version = Version;
     }
     // to ensure "InputMode" is required (not null)
     if (InputMode == null)
     {
         throw new InvalidDataException("InputMode is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.InputMode = InputMode;
     }
     // to ensure "ErrorCorrectionLevel" is required (not null)
     if (ErrorCorrectionLevel == null)
     {
         throw new InvalidDataException("ErrorCorrectionLevel is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.ErrorCorrectionLevel = ErrorCorrectionLevel;
     }
     // to ensure "Position" is required (not null)
     if (Position == null)
     {
         throw new InvalidDataException("Position is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.Position = Position;
     }
     // to ensure "Width" is required (not null)
     if (Width == null)
     {
         throw new InvalidDataException("Width is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.Width = Width;
     }
     // to ensure "Height" is required (not null)
     if (Height == null)
     {
         throw new InvalidDataException("Height is a required property for QrCodeWatermarkData and cannot be null");
     }
     else
     {
         this.Height = Height;
     }
     this.SourceFileName = SourceFileName;
     // use default value if no "UseAsyncPattern" provided
     if (UseAsyncPattern == null)
     {
         this.UseAsyncPattern = false;
     }
     else
     {
         this.UseAsyncPattern = UseAsyncPattern;
     }
     this.SharepointFile = SharepointFile;
     this.X = X;
     this.Y = Y;
     // use default value if no "Layer" provided
     if (Layer == null)
     {
         this.Layer = LayerEnum.Foreground;
     }
     else
     {
         this.Layer = Layer;
     }
     this.Rotation = Rotation;
     // use default value if no "Opacity" provided
     if (Opacity == null)
     {
         this.Opacity = "100";
     }
     else
     {
         this.Opacity = Opacity;
     }
     this.FillColor    = FillColor;
     this.LineColor    = LineColor;
     this.StartPage    = StartPage;
     this.EndPage      = EndPage;
     this.PageInterval = PageInterval;
     // use default value if no "PageOrientation" provided
     if (PageOrientation == null)
     {
         this.PageOrientation = PageOrientationEnum.Both;
     }
     else
     {
         this.PageOrientation = PageOrientation;
     }
     // use default value if no "FailOnError" provided
     if (FailOnError == null)
     {
         this.FailOnError = true;
     }
     else
     {
         this.FailOnError = FailOnError;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ChainSettings" /> class.
 /// </summary>
 /// <param name="SingleProofChain">The proof chain id linked to the current configuration. This is a shared proof chain for all registrations.</param>
 /// <param name="ContentRegistrationChainTypes">A set of content registration targets.</param>
 /// <param name="MetadataRegistrationChains">A set of metadata registration targets (not in use currently).</param>
 /// <param name="Secret">A secret that is used as a seed during hashing (required).</param>
 /// <param name="Version">The settings version (only 1 for now) (required).</param>
 /// <param name="HashAlgorithm">The hashing method used for the content. We always return and expect the convertInputToHashWhenNeeded in HEX form.</param>
 public ChainSettings(string SingleProofChain = default(string), List <ContentRegistrationChainTypesEnum> ContentRegistrationChainTypes = default(List <ContentRegistrationChainTypesEnum>), List <MetadataRegistrationChainsEnum> MetadataRegistrationChains = default(List <MetadataRegistrationChainsEnum>), byte[] Secret = default(byte[]), VersionEnum?Version = default(VersionEnum?), HashAlgorithmEnum?HashAlgorithm = default(HashAlgorithmEnum?))
 {
     // to ensure "Secret" is required (not null)
     if (Secret == null)
     {
         throw new InvalidDataException("Secret is a required property for ChainSettings and cannot be null");
     }
     else
     {
         this.Secret = Secret;
     }
     // to ensure "Version" is required (not null)
     if (Version == null)
     {
         throw new InvalidDataException("Version is a required property for ChainSettings and cannot be null");
     }
     else
     {
         this.Version = Version;
     }
     this.SingleProofChain = SingleProofChain;
     this.ContentRegistrationChainTypes = ContentRegistrationChainTypes;
     this.MetadataRegistrationChains    = MetadataRegistrationChains;
     this.HashAlgorithm = HashAlgorithm;
 }