// Path: src/main/java/com/tomtom/services/configuration/domain/Parameter.java
// @Immutable
// @JsonInclude(Include.NON_EMPTY)
// public final class Parameter {
// 
//     @Nonnull
//     private final String key;
// 
//     @Nonnull
//     private final String value;
// 
//     public Parameter(
//             @Nonnull final String key,
//             @Nonnull final String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public Parameter(@Nonnull final ParameterDTO parameterDTO) {
//         //noinspection ConstantConditions Already checked in Configuration during load
//         this(parameterDTO.getKey(), parameterDTO.getValue());
//     }
// 
//     @Nonnull
//     public String getKey() {
//         return key;
//     }
// 
//     @Nonnull
//     public String getValue() {
//         return value;
//     }
// 
//     @Override
//     @Nonnull
//     public String toString() {
//         return Json.toJson(this);
//     }
// }


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tomtom.services.configuration.domain.Parameter;
import com.tomtom.speedtools.apivalidation.ApiDTO;
import com.tomtom.speedtools.utils.StringUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/*
 * Copyright (C) 2012-2021, TomTom (http://tomtom.com).
 *
 * 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.tomtom.services.configuration.dto;



@SuppressWarnings({"EqualsWhichDoesntCheckParameterClass", "NullableProblems", "NonFinalFieldReferenceInEquals", "NonFinalFieldReferencedInHashCode", "squid:S2160"})
@JsonInclude(Include.NON_EMPTY)
@XmlRootElement(name = "parameter")
@XmlAccessorType(XmlAccessType.FIELD)
public final class ParameterDTO extends ApiDTO implements SupportsInclude {

    /**
     * Key name. Cannot be null or empty after parsing includes.
     */
    @JsonProperty("key")
    @XmlElement(name = "key")
    @Nullable
    private String key;

    /**
     * Value. Cannot be null after parsing includes, but can be empty.
     */
    @JsonProperty("value")
    @XmlElement(name = "value")
    @Nullable
    private String value;

    /**
     * Include name. Can be null.
     */
    @JsonProperty("include")
    @XmlElement(name = "include")
    @Nullable
    private String include;

    /**
     * Include name. Can be null.
     */
    @JsonProperty("include_array")
    @XmlElement(name = "include_array")
    @Nullable
    private String includeArray;

    public ParameterDTO(
            @Nonnull final String key,
            @Nonnull final String value) {
        super(false);
        setKey(key);
        setValue(value);
    }

    /**
     * Convert a Parameter object into a ParameterDTO.
     *
     * @param parameter Parameter to convert.
     */
// Path: src/main/java/com/tomtom/services/configuration/domain/Parameter.java
// @Immutable
// @JsonInclude(Include.NON_EMPTY)
// public final class Parameter {
// 
//     @Nonnull
//     private final String key;
// 
//     @Nonnull
//     private final String value;
// 
//     public Parameter(
//             @Nonnull final String key,
//             @Nonnull final String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public Parameter(@Nonnull final ParameterDTO parameterDTO) {
//         //noinspection ConstantConditions Already checked in Configuration during load
//         this(parameterDTO.getKey(), parameterDTO.getValue());
//     }
// 
//     @Nonnull
//     public String getKey() {
//         return key;
//     }
// 
//     @Nonnull
//     public String getValue() {
//         return value;
//     }
// 
//     @Override
//     @Nonnull
//     public String toString() {
//         return Json.toJson(this);
//     }
// }


// Path: src/main/java/com/tomtom/services/configuration/dto/ParameterDTO.java
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tomtom.services.configuration.domain.Parameter;
import com.tomtom.speedtools.apivalidation.ApiDTO;
import com.tomtom.speedtools.utils.StringUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/*
 * Copyright (C) 2012-2021, TomTom (http://tomtom.com).
 *
 * 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.tomtom.services.configuration.dto;



@SuppressWarnings({"EqualsWhichDoesntCheckParameterClass", "NullableProblems", "NonFinalFieldReferenceInEquals", "NonFinalFieldReferencedInHashCode", "squid:S2160"})
@JsonInclude(Include.NON_EMPTY)
@XmlRootElement(name = "parameter")
@XmlAccessorType(XmlAccessType.FIELD)
public final class ParameterDTO extends ApiDTO implements SupportsInclude {

    /**
     * Key name. Cannot be null or empty after parsing includes.
     */
    @JsonProperty("key")
    @XmlElement(name = "key")
    @Nullable
    private String key;

    /**
     * Value. Cannot be null after parsing includes, but can be empty.
     */
    @JsonProperty("value")
    @XmlElement(name = "value")
    @Nullable
    private String value;

    /**
     * Include name. Can be null.
     */
    @JsonProperty("include")
    @XmlElement(name = "include")
    @Nullable
    private String include;

    /**
     * Include name. Can be null.
     */
    @JsonProperty("include_array")
    @XmlElement(name = "include_array")
    @Nullable
    private String includeArray;

    public ParameterDTO(
            @Nonnull final String key,
            @Nonnull final String value) {
        super(false);
        setKey(key);
        setValue(value);
    }

    /**
     * Convert a Parameter object into a ParameterDTO.
     *
     * @param parameter Parameter to convert.
     */
    public ParameterDTO(@Nonnull final Parameter parameter) {