/// <summary> /// Initializes a new instance of the ProfileResponse class. /// </summary> /// <param name="id">A unique identifier of the profile</param> /// <param name="createdAt">Date when the profile was created.</param> /// <param name="canvas">Possible values include: 'intelligent', /// 'noise', 'block', 'off'</param> /// <param name="startPage">This website will be opened in the browser /// when the profile launches.</param> /// <param name="extensions">A list of abolute paths from where the /// profile should load extensions or addons when starting the browser. /// For chrome and edge use CRX3 format extensions. For firefox use /// signed xpi format addons.</param> /// <param name="notes">A free text including any notes written by the /// user.</param> /// <param name="launcher">The mode how the profile should be launched. /// It determines which browser to launch. This cannot be modified /// after creation. Possible values are 'automatic', 'chrome', /// 'chromium', 'firefox', 'edge', 'external'</param> /// <param name="lastKnownPath">An absolute path where the related /// .kameleo profile file was accessed lastly. This is updated when a /// profile is saved to a .kameleo file, or loaded from a .kameleo /// file.</param> public ProfileResponse(System.Guid id, System.DateTime createdAt, BaseProfile baseProfile, string canvas, WebglSpoofingTypeWebglSpoofingOptionsMultiLevelChoice webgl, TimezoneSpoofingTypeTimezoneMultiLevelChoice timezone, GeolocationSpoofingTypeGeolocationSpoofingOptionsMultiLevelChoice geolocation, ProxyConnectionTypeServerMultiLevelChoice proxy, WebRtcSpoofingTypeWebRtcSpoofingOptionsMultiLevelChoice webRtc, FontSpoofingTypeFontIListMultiLevelChoice fonts, PluginSpoofingTypePluginIListMultiLevelChoice plugins, ScreenSpoofingTypeScreenSizeMultiLevelChoice screen, string startPage, IList <string> extensions, string notes, string launcher, StatusResponse status, string lastKnownPath = default(string)) { Id = id; LastKnownPath = lastKnownPath; CreatedAt = createdAt; BaseProfile = baseProfile; Canvas = canvas; Webgl = webgl; Timezone = timezone; Geolocation = geolocation; Proxy = proxy; WebRtc = webRtc; Fonts = fonts; Plugins = plugins; Screen = screen; StartPage = startPage; Extensions = extensions; Notes = notes; Launcher = launcher; Status = status; CustomInit(); }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (BaseProfile == null) { throw new ValidationException(ValidationRules.CannotBeNull, "BaseProfile"); } if (Canvas == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Canvas"); } if (Webgl == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Webgl"); } if (Timezone == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Timezone"); } if (Geolocation == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Geolocation"); } if (Proxy == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Proxy"); } if (WebRtc == null) { throw new ValidationException(ValidationRules.CannotBeNull, "WebRtc"); } if (Fonts == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Fonts"); } if (Plugins == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Plugins"); } if (Screen == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Screen"); } if (StartPage == null) { throw new ValidationException(ValidationRules.CannotBeNull, "StartPage"); } if (Extensions == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Extensions"); } if (Notes == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Notes"); } if (Launcher == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Launcher"); } if (Status == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Status"); } if (BaseProfile != null) { BaseProfile.Validate(); } if (Webgl != null) { Webgl.Validate(); } if (Timezone != null) { Timezone.Validate(); } if (Geolocation != null) { Geolocation.Validate(); } if (Proxy != null) { Proxy.Validate(); } if (WebRtc != null) { WebRtc.Validate(); } if (Fonts != null) { Fonts.Validate(); } if (Plugins != null) { Plugins.Validate(); } if (Screen != null) { Screen.Validate(); } if (Status != null) { Status.Validate(); } }