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

package com.azure.resourcemanager.eventgrid.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationUpdateParameterProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Properties of the partner configuration update. */
@Fluent
public final class PartnerConfigurationUpdateParameters {
    /*
     * Tags of the partner configuration resource.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * Properties of the Topic resource.
     */
    @JsonProperty(value = "properties")
    private PartnerConfigurationUpdateParameterProperties innerProperties;

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

    /**
     * Get the tags property: Tags of the partner configuration resource.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Tags of the partner configuration resource.
     *
     * @param tags the tags value to set.
     * @return the PartnerConfigurationUpdateParameters object itself.
     */
    public PartnerConfigurationUpdateParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: Properties of the Topic resource.
     *
     * @return the innerProperties value.
     */
    private PartnerConfigurationUpdateParameterProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the defaultMaximumExpirationTimeInDays property: The default time used to validate the maximum expiration
     * time for each authorized partners in days. Allowed values ar between 1 and 365 days.
     *
     * @return the defaultMaximumExpirationTimeInDays value.
     */
    public Integer defaultMaximumExpirationTimeInDays() {
        return this.innerProperties() == null ? null : this.innerProperties().defaultMaximumExpirationTimeInDays();
    }

    /**
     * Set the defaultMaximumExpirationTimeInDays property: The default time used to validate the maximum expiration
     * time for each authorized partners in days. Allowed values ar between 1 and 365 days.
     *
     * @param defaultMaximumExpirationTimeInDays the defaultMaximumExpirationTimeInDays value to set.
     * @return the PartnerConfigurationUpdateParameters object itself.
     */
    public PartnerConfigurationUpdateParameters withDefaultMaximumExpirationTimeInDays(
        Integer defaultMaximumExpirationTimeInDays) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PartnerConfigurationUpdateParameterProperties();
        }
        this.innerProperties().withDefaultMaximumExpirationTimeInDays(defaultMaximumExpirationTimeInDays);
        return this;
    }

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