// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.changeanalysis.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Data of a property change. */
@Fluent
public final class PropertyChange {
    /*
     * The type of the change.
     */
    @JsonProperty(value = "changeType")
    private ChangeType changeType;

    /*
     * The change category.
     */
    @JsonProperty(value = "changeCategory")
    private ChangeCategory changeCategory;

    /*
     * The json path of the changed property.
     */
    @JsonProperty(value = "jsonPath")
    private String jsonPath;

    /*
     * The enhanced display name of the json path. E.g., the json path value[0].properties will be translated to
     * something meaningful like slots["Staging"].properties.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * The level property.
     */
    @JsonProperty(value = "level")
    private Level level;

    /*
     * The description of the changed property.
     */
    @JsonProperty(value = "description")
    private String description;

    /*
     * The value of the property before the change.
     */
    @JsonProperty(value = "oldValue")
    private String oldValue;

    /*
     * The value of the property after the change.
     */
    @JsonProperty(value = "newValue")
    private String newValue;

    /*
     * The boolean indicating whether the oldValue and newValue are masked. The values are masked if it contains
     * sensitive information that the user doesn't have access to.
     */
    @JsonProperty(value = "isDataMasked")
    private Boolean isDataMasked;

    /** Creates an instance of PropertyChange class. */
    public PropertyChange() {
    }

    /**
     * Get the changeType property: The type of the change.
     *
     * @return the changeType value.
     */
    public ChangeType changeType() {
        return this.changeType;
    }

    /**
     * Set the changeType property: The type of the change.
     *
     * @param changeType the changeType value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withChangeType(ChangeType changeType) {
        this.changeType = changeType;
        return this;
    }

    /**
     * Get the changeCategory property: The change category.
     *
     * @return the changeCategory value.
     */
    public ChangeCategory changeCategory() {
        return this.changeCategory;
    }

    /**
     * Set the changeCategory property: The change category.
     *
     * @param changeCategory the changeCategory value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withChangeCategory(ChangeCategory changeCategory) {
        this.changeCategory = changeCategory;
        return this;
    }

    /**
     * Get the jsonPath property: The json path of the changed property.
     *
     * @return the jsonPath value.
     */
    public String jsonPath() {
        return this.jsonPath;
    }

    /**
     * Set the jsonPath property: The json path of the changed property.
     *
     * @param jsonPath the jsonPath value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withJsonPath(String jsonPath) {
        this.jsonPath = jsonPath;
        return this;
    }

    /**
     * Get the displayName property: The enhanced display name of the json path. E.g., the json path value[0].properties
     * will be translated to something meaningful like slots["Staging"].properties.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: The enhanced display name of the json path. E.g., the json path value[0].properties
     * will be translated to something meaningful like slots["Staging"].properties.
     *
     * @param displayName the displayName value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the level property: The level property.
     *
     * @return the level value.
     */
    public Level level() {
        return this.level;
    }

    /**
     * Set the level property: The level property.
     *
     * @param level the level value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withLevel(Level level) {
        this.level = level;
        return this;
    }

    /**
     * Get the description property: The description of the changed property.
     *
     * @return the description value.
     */
    public String description() {
        return this.description;
    }

    /**
     * Set the description property: The description of the changed property.
     *
     * @param description the description value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withDescription(String description) {
        this.description = description;
        return this;
    }

    /**
     * Get the oldValue property: The value of the property before the change.
     *
     * @return the oldValue value.
     */
    public String oldValue() {
        return this.oldValue;
    }

    /**
     * Set the oldValue property: The value of the property before the change.
     *
     * @param oldValue the oldValue value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withOldValue(String oldValue) {
        this.oldValue = oldValue;
        return this;
    }

    /**
     * Get the newValue property: The value of the property after the change.
     *
     * @return the newValue value.
     */
    public String newValue() {
        return this.newValue;
    }

    /**
     * Set the newValue property: The value of the property after the change.
     *
     * @param newValue the newValue value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withNewValue(String newValue) {
        this.newValue = newValue;
        return this;
    }

    /**
     * Get the isDataMasked property: The boolean indicating whether the oldValue and newValue are masked. The values
     * are masked if it contains sensitive information that the user doesn't have access to.
     *
     * @return the isDataMasked value.
     */
    public Boolean isDataMasked() {
        return this.isDataMasked;
    }

    /**
     * Set the isDataMasked property: The boolean indicating whether the oldValue and newValue are masked. The values
     * are masked if it contains sensitive information that the user doesn't have access to.
     *
     * @param isDataMasked the isDataMasked value to set.
     * @return the PropertyChange object itself.
     */
    public PropertyChange withIsDataMasked(Boolean isDataMasked) {
        this.isDataMasked = isDataMasked;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
