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

package com.azure.resourcemanager.communication.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.communication.fluent.models.UpdateDomainProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** A class that describes the PATCH request parameters of a Domains resource. */
@Fluent
public final class UpdateDomainRequestParameters extends TaggedResource {
    /*
     * A class that describes the updatable properties of a Domains resource.
     */
    @JsonProperty(value = "properties")
    private UpdateDomainProperties innerProperties;

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

    /**
     * Get the innerProperties property: A class that describes the updatable properties of a Domains resource.
     *
     * @return the innerProperties value.
     */
    private UpdateDomainProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public UpdateDomainRequestParameters withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the userEngagementTracking property: Describes whether user engagement tracking is enabled or disabled.
     *
     * @return the userEngagementTracking value.
     */
    public UserEngagementTracking userEngagementTracking() {
        return this.innerProperties() == null ? null : this.innerProperties().userEngagementTracking();
    }

    /**
     * Set the userEngagementTracking property: Describes whether user engagement tracking is enabled or disabled.
     *
     * @param userEngagementTracking the userEngagementTracking value to set.
     * @return the UpdateDomainRequestParameters object itself.
     */
    public UpdateDomainRequestParameters withUserEngagementTracking(UserEngagementTracking userEngagementTracking) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateDomainProperties();
        }
        this.innerProperties().withUserEngagementTracking(userEngagementTracking);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}
