<commit_before>/*
 * Copyright 2019 EPAM Systems
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.epam.ta.reportportal.ws.model.launch;

import com.epam.ta.reportportal.ws.model.OwnedResource;
import com.epam.ta.reportportal.ws.model.ValidationConstraints;
import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource;
import com.epam.ta.reportportal.ws.model.statistics.StatisticsResource;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.Set;

/**
 * JSON Representation of Report Portal's Launch domain object
 *
 * @author <NAME>
 */
@JsonInclude(Include.NON_NULL)
public class LaunchResource extends OwnedResource {

	@NotNull
	@JsonProperty(value = "id", required = true)
	private Long launchId;

	@NotBlank
	@JsonProperty(value = "uuid", required = true)
	private String uuid;

	@NotBlank
	@Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH)
	@JsonProperty(value = "name", required = true)
	private String name;

	@NotNull
	@JsonProperty(value = "number", required = true)
	private Long number;

	@JsonProperty(value = "description")
	@Size(max = ValidationConstraints.MAX_LAUNCH_DESCRIPTION_LENGTH)
	private String description;

	@NotNull
	@JsonProperty(value = "startTime", required = true)
	private Date startTime;

	@JsonProperty(value = "endTime")
	private Date endTime;

	@JsonProperty(value = "lastModified")
	private Date lastModified;

	@NotNull
	@JsonProperty(value = "status", required = true)
	private String status;

	@JsonProperty(value = "statistics")
	@Valid
	private StatisticsResource statisticsResource;

	@JsonProperty(value = "attributes")
	private Set<ItemAttributeResource> attributes;

	@JsonProperty(value = "mode")
	private Mode mode;

	@JsonProperty(value = "analysing")
	private Set<String> analyzers;

	@JsonProperty(value = "approximateDuration")
	private double approximateDuration;

	@JsonProperty(value = "hasRetries")
	private boolean hasRetries;

	public double getApproximateDuration() {
		return approximateDuration;
	}

	public void setApproximateDuration(double approximateDuration) {
		this.approximateDuration = approximateDuration;
	}

	public Long getLaunchId() {
		return launchId;
	}

	public void setLaunchId(Long launchId) {
		this.launchId = launchId;
	}

	public String getUuid() {
		return uuid;
	}<commit_msg>Analyzers initialization impl<commit_after>/*
 * Copyright 2019 EPAM Systems
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.epam.ta.reportportal.ws.model.launch;

import com.epam.ta.reportportal.ws.model.OwnedResource;
import com.epam.ta.reportportal.ws.model.ValidationConstraints;
import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource;
import com.epam.ta.reportportal.ws.model.statistics.StatisticsResource;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;

/**
 * JSON Representation of Report Portal's Launch domain object
 *
 * @author <NAME>
 */
@JsonInclude(Include.NON_NULL)
public class LaunchResource extends OwnedResource {

	@NotNull
	@JsonProperty(value = "id", required = true)
	private Long launchId;

	@NotBlank
	@JsonProperty(value = "uuid", required = true)
	private String uuid;

	@NotBlank
	@Size(min = ValidationConstraints.MIN_NAME_LENGTH, max = ValidationConstraints.MAX_NAME_LENGTH)
	@JsonProperty(value = "name", required = true)
	private String name;

	@NotNull
	@JsonProperty(value = "number", required = true)
	private Long number;

	@JsonProperty(value = "description")
	@Size(max = ValidationConstraints.MAX_LAUNCH_DESCRIPTION_LENGTH)
	private String description;

	@NotNull
	@JsonProperty(value = "startTime", required = true)
	private Date startTime;

	@JsonProperty(value = "endTime")
	private Date endTime;

	@JsonProperty(value = "lastModified")
	private Date lastModified;

	@NotNull
	@JsonProperty(value = "status", required = true)
	private String status;

	@JsonProperty(value = "statistics")
	@Valid
	private StatisticsResource statisticsResource;

	@JsonProperty(value = "attributes")
	private Set<ItemAttributeResource> attributes;

	@JsonProperty(value = "mode")
	private Mode mode;

	@JsonProperty(value = "analysing")
	private Set<String> analyzers = new LinkedHashSet<>();

	@JsonProperty(value = "approximateDuration")
	private double approximateDuration;

	@JsonProperty(value = "hasRetries")
	private boolean hasRetries;

	public double getApproximateDuration() {
		return approximateDuration;
	}

	public void setApproximateDuration(double approximateDuration) {
		this.approximateDuration = approximateDuration;
	}

	public Long getLaunchId() {
		return launchId;
	}

	public void setLaunchId(Long launchId) {
		this.launchId = launchId;
	}

	public String getUuid() {
		return uuid;
	}
{'fraction_non_alphanumeric': 0.09648303765950825, 'fraction_numerical': 0.0024898848428260194, 'mean_word_length': 5.375992063492063, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7393933', 'n_tokens_mistral': 1914, 'n_tokens_neox': 1828, 'n_words': 514}