// Path: src/main/java/com/frameworkium/core/ui/capture/model/Browser.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class Browser {
// 
//   public String name;
//   public String version;
//   public String device;
//   public String platform;
//   public String platformVersion;
// 
//   /**
//    * Create browser object.
//    */
//   public Browser() {
// 
//     Optional<String> userAgent = UITestLifecycle.get().getUserAgent();
//     if (userAgent.isPresent() && !userAgent.get().isEmpty()) {
//       UserAgentStringParser uaParser = UADetectorServiceFactory.getResourceModuleParser();
//       ReadableUserAgent agent = uaParser.parse(userAgent.get());
// 
//       this.name = agent.getName();
//       this.version = agent.getVersionNumber().toVersionString();
//       this.device = agent.getDeviceCategory().getName();
//       this.platform = agent.getOperatingSystem().getName();
//       this.platformVersion = agent.getOperatingSystem().getVersionNumber().toVersionString();
// 
//     } else {
//       // Fall-back to the Property class
//       if (BROWSER.isSpecified()) {
//         this.name = BROWSER.getValue().toLowerCase();
//       } else {
//         this.name = DriverSetup.DEFAULT_BROWSER.toString();
//       }
//       if (BROWSER_VERSION.isSpecified()) {
//         this.version = BROWSER_VERSION.getValue();
//       }
//       if (DEVICE.isSpecified()) {
//         this.device = DEVICE.getValue();
//       }
//       if (PLATFORM.isSpecified()) {
//         this.platform = PLATFORM.getValue();
//       }
//       if (PLATFORM_VERSION.isSpecified()) {
//         this.platformVersion = PLATFORM_VERSION.getValue();
//       }
//     }
//   }
// 
// }
// 
// Path: src/main/java/com/frameworkium/core/ui/capture/model/SoftwareUnderTest.java
// public class SoftwareUnderTest {
// 
//   public String name;
//   public String version;
// 
//   /**
//    * Software under test object.
//    */
//   public SoftwareUnderTest() {
//     if (SUT_NAME.isSpecified()) {
//       this.name = SUT_NAME.getValue();
//     }
//     if (SUT_VERSION.isSpecified()) {
//       this.version = SUT_VERSION.getValue();
//     }
//   }
// }


import com.fasterxml.jackson.annotation.JsonInclude;
import com.frameworkium.core.ui.capture.model.Browser;
import com.frameworkium.core.ui.capture.model.SoftwareUnderTest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
package com.frameworkium.core.ui.capture.model.message;


@JsonInclude(JsonInclude.Include.NON_NULL)
public final class CreateExecution {

  private static final Logger logger = LogManager.getLogger();
  public String testID;
  public Browser browser;
  public SoftwareUnderTest softwareUnderTest;
  public String nodeAddress;

  /**
   * Create Capture execution.
   */
  public CreateExecution(String testID, String nodeAddress) {

    logger.debug("CreateExecution: testID='{}', nodeAddress='{}", testID, nodeAddress);
    this.testID = testID;
// Path: src/main/java/com/frameworkium/core/ui/capture/model/Browser.java
// @JsonInclude(JsonInclude.Include.NON_NULL)
// public class Browser {
// 
//   public String name;
//   public String version;
//   public String device;
//   public String platform;
//   public String platformVersion;
// 
//   /**
//    * Create browser object.
//    */
//   public Browser() {
// 
//     Optional<String> userAgent = UITestLifecycle.get().getUserAgent();
//     if (userAgent.isPresent() && !userAgent.get().isEmpty()) {
//       UserAgentStringParser uaParser = UADetectorServiceFactory.getResourceModuleParser();
//       ReadableUserAgent agent = uaParser.parse(userAgent.get());
// 
//       this.name = agent.getName();
//       this.version = agent.getVersionNumber().toVersionString();
//       this.device = agent.getDeviceCategory().getName();
//       this.platform = agent.getOperatingSystem().getName();
//       this.platformVersion = agent.getOperatingSystem().getVersionNumber().toVersionString();
// 
//     } else {
//       // Fall-back to the Property class
//       if (BROWSER.isSpecified()) {
//         this.name = BROWSER.getValue().toLowerCase();
//       } else {
//         this.name = DriverSetup.DEFAULT_BROWSER.toString();
//       }
//       if (BROWSER_VERSION.isSpecified()) {
//         this.version = BROWSER_VERSION.getValue();
//       }
//       if (DEVICE.isSpecified()) {
//         this.device = DEVICE.getValue();
//       }
//       if (PLATFORM.isSpecified()) {
//         this.platform = PLATFORM.getValue();
//       }
//       if (PLATFORM_VERSION.isSpecified()) {
//         this.platformVersion = PLATFORM_VERSION.getValue();
//       }
//     }
//   }
// 
// }
// 
// Path: src/main/java/com/frameworkium/core/ui/capture/model/SoftwareUnderTest.java
// public class SoftwareUnderTest {
// 
//   public String name;
//   public String version;
// 
//   /**
//    * Software under test object.
//    */
//   public SoftwareUnderTest() {
//     if (SUT_NAME.isSpecified()) {
//       this.name = SUT_NAME.getValue();
//     }
//     if (SUT_VERSION.isSpecified()) {
//       this.version = SUT_VERSION.getValue();
//     }
//   }
// }


// Path: src/main/java/com/frameworkium/core/ui/capture/model/message/CreateExecution.java
import com.fasterxml.jackson.annotation.JsonInclude;
import com.frameworkium.core.ui.capture.model.Browser;
import com.frameworkium.core.ui.capture.model.SoftwareUnderTest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

package com.frameworkium.core.ui.capture.model.message;


@JsonInclude(JsonInclude.Include.NON_NULL)
public final class CreateExecution {

  private static final Logger logger = LogManager.getLogger();
  public String testID;
  public Browser browser;
  public SoftwareUnderTest softwareUnderTest;
  public String nodeAddress;

  /**
   * Create Capture execution.
   */
  public CreateExecution(String testID, String nodeAddress) {

    logger.debug("CreateExecution: testID='{}', nodeAddress='{}", testID, nodeAddress);
    this.testID = testID;
    this.browser = new Browser();