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

package com.azure.resourcemanager.providerhub.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The ResourceProviderManagement model. */
@Fluent
public class ResourceProviderManagement {
    /*
     * The schemaOwners property.
     */
    @JsonProperty(value = "schemaOwners")
    private List<String> schemaOwners;

    /*
     * The manifestOwners property.
     */
    @JsonProperty(value = "manifestOwners")
    private List<String> manifestOwners;

    /*
     * The incidentRoutingService property.
     */
    @JsonProperty(value = "incidentRoutingService")
    private String incidentRoutingService;

    /*
     * The incidentRoutingTeam property.
     */
    @JsonProperty(value = "incidentRoutingTeam")
    private String incidentRoutingTeam;

    /*
     * The incidentContactEmail property.
     */
    @JsonProperty(value = "incidentContactEmail")
    private String incidentContactEmail;

    /*
     * The serviceTreeInfos property.
     */
    @JsonProperty(value = "serviceTreeInfos")
    private List<ServiceTreeInfo> serviceTreeInfos;

    /*
     * The resourceAccessPolicy property.
     */
    @JsonProperty(value = "resourceAccessPolicy")
    private ResourceAccessPolicy resourceAccessPolicy;

    /*
     * The resourceAccessRoles property.
     */
    @JsonProperty(value = "resourceAccessRoles")
    private List<Object> resourceAccessRoles;

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

    /**
     * Get the schemaOwners property: The schemaOwners property.
     *
     * @return the schemaOwners value.
     */
    public List<String> schemaOwners() {
        return this.schemaOwners;
    }

    /**
     * Set the schemaOwners property: The schemaOwners property.
     *
     * @param schemaOwners the schemaOwners value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withSchemaOwners(List<String> schemaOwners) {
        this.schemaOwners = schemaOwners;
        return this;
    }

    /**
     * Get the manifestOwners property: The manifestOwners property.
     *
     * @return the manifestOwners value.
     */
    public List<String> manifestOwners() {
        return this.manifestOwners;
    }

    /**
     * Set the manifestOwners property: The manifestOwners property.
     *
     * @param manifestOwners the manifestOwners value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withManifestOwners(List<String> manifestOwners) {
        this.manifestOwners = manifestOwners;
        return this;
    }

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

    /**
     * Set the incidentRoutingService property: The incidentRoutingService property.
     *
     * @param incidentRoutingService the incidentRoutingService value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withIncidentRoutingService(String incidentRoutingService) {
        this.incidentRoutingService = incidentRoutingService;
        return this;
    }

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

    /**
     * Set the incidentRoutingTeam property: The incidentRoutingTeam property.
     *
     * @param incidentRoutingTeam the incidentRoutingTeam value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withIncidentRoutingTeam(String incidentRoutingTeam) {
        this.incidentRoutingTeam = incidentRoutingTeam;
        return this;
    }

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

    /**
     * Set the incidentContactEmail property: The incidentContactEmail property.
     *
     * @param incidentContactEmail the incidentContactEmail value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withIncidentContactEmail(String incidentContactEmail) {
        this.incidentContactEmail = incidentContactEmail;
        return this;
    }

    /**
     * Get the serviceTreeInfos property: The serviceTreeInfos property.
     *
     * @return the serviceTreeInfos value.
     */
    public List<ServiceTreeInfo> serviceTreeInfos() {
        return this.serviceTreeInfos;
    }

    /**
     * Set the serviceTreeInfos property: The serviceTreeInfos property.
     *
     * @param serviceTreeInfos the serviceTreeInfos value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withServiceTreeInfos(List<ServiceTreeInfo> serviceTreeInfos) {
        this.serviceTreeInfos = serviceTreeInfos;
        return this;
    }

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

    /**
     * Set the resourceAccessPolicy property: The resourceAccessPolicy property.
     *
     * @param resourceAccessPolicy the resourceAccessPolicy value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withResourceAccessPolicy(ResourceAccessPolicy resourceAccessPolicy) {
        this.resourceAccessPolicy = resourceAccessPolicy;
        return this;
    }

    /**
     * Get the resourceAccessRoles property: The resourceAccessRoles property.
     *
     * @return the resourceAccessRoles value.
     */
    public List<Object> resourceAccessRoles() {
        return this.resourceAccessRoles;
    }

    /**
     * Set the resourceAccessRoles property: The resourceAccessRoles property.
     *
     * @param resourceAccessRoles the resourceAccessRoles value to set.
     * @return the ResourceProviderManagement object itself.
     */
    public ResourceProviderManagement withResourceAccessRoles(List<Object> resourceAccessRoles) {
        this.resourceAccessRoles = resourceAccessRoles;
        return this;
    }

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