All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.managementgroups.models.ManagementGroupChildInfo Maven / Gradle / Ivy

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

package com.azure.resourcemanager.managementgroups.models;

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

/** The child information of a management group. */
@Fluent
public final class ManagementGroupChildInfo {
    /*
     * The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups)
     */
    @JsonProperty(value = "type")
    private ManagementGroupChildType type;

    /*
     * The fully qualified ID for the child resource (management group or subscription).  For example,
     * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * The name of the child entity.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The friendly name of the child resource.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * The list of children.
     */
    @JsonProperty(value = "children")
    private List children;

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

    /**
     * Get the type property: The fully qualified resource type which includes provider namespace (e.g.
     * Microsoft.Management/managementGroups).
     *
     * @return the type value.
     */
    public ManagementGroupChildType type() {
        return this.type;
    }

    /**
     * Set the type property: The fully qualified resource type which includes provider namespace (e.g.
     * Microsoft.Management/managementGroups).
     *
     * @param type the type value to set.
     * @return the ManagementGroupChildInfo object itself.
     */
    public ManagementGroupChildInfo withType(ManagementGroupChildType type) {
        this.type = type;
        return this;
    }

    /**
     * Get the id property: The fully qualified ID for the child resource (management group or subscription). For
     * example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: The fully qualified ID for the child resource (management group or subscription). For
     * example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000.
     *
     * @param id the id value to set.
     * @return the ManagementGroupChildInfo object itself.
     */
    public ManagementGroupChildInfo withId(String id) {
        this.id = id;
        return this;
    }

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

    /**
     * Set the name property: The name of the child entity.
     *
     * @param name the name value to set.
     * @return the ManagementGroupChildInfo object itself.
     */
    public ManagementGroupChildInfo withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the displayName property: The friendly name of the child resource.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: The friendly name of the child resource.
     *
     * @param displayName the displayName value to set.
     * @return the ManagementGroupChildInfo object itself.
     */
    public ManagementGroupChildInfo withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the children property: The list of children.
     *
     * @return the children value.
     */
    public List children() {
        return this.children;
    }

    /**
     * Set the children property: The list of children.
     *
     * @param children the children value to set.
     * @return the ManagementGroupChildInfo object itself.
     */
    public ManagementGroupChildInfo withChildren(List children) {
        this.children = children;
        return this;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy