com.azure.resourcemanager.managementgroups.fluent.models.SubscriptionUnderManagementGroupProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-managementgroups Show documentation
Show all versions of azure-resourcemanager-managementgroups Show documentation
This package contains Microsoft Azure SDK for ManagementGroups Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Management Groups API enables consolidation of multiple
subscriptions/resources into an organizational hierarchy and centrally
manage access control, policies, alerting and reporting for those resources.
. Package tag package-2021-04.
// 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.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.managementgroups.models.DescendantParentGroupInfo;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The generic properties of subscription under a management group. */
@Fluent
public final class SubscriptionUnderManagementGroupProperties {
/*
* The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000
*/
@JsonProperty(value = "tenant")
private String tenant;
/*
* The friendly name of the subscription.
*/
@JsonProperty(value = "displayName")
private String displayName;
/*
* The ID of the parent management group.
*/
@JsonProperty(value = "parent")
private DescendantParentGroupInfo parent;
/*
* The state of the subscription.
*/
@JsonProperty(value = "state")
private String state;
/** Creates an instance of SubscriptionUnderManagementGroupProperties class. */
public SubscriptionUnderManagementGroupProperties() {
}
/**
* Get the tenant property: The AAD Tenant ID associated with the subscription. For example,
* 00000000-0000-0000-0000-000000000000.
*
* @return the tenant value.
*/
public String tenant() {
return this.tenant;
}
/**
* Set the tenant property: The AAD Tenant ID associated with the subscription. For example,
* 00000000-0000-0000-0000-000000000000.
*
* @param tenant the tenant value to set.
* @return the SubscriptionUnderManagementGroupProperties object itself.
*/
public SubscriptionUnderManagementGroupProperties withTenant(String tenant) {
this.tenant = tenant;
return this;
}
/**
* Get the displayName property: The friendly name of the subscription.
*
* @return the displayName value.
*/
public String displayName() {
return this.displayName;
}
/**
* Set the displayName property: The friendly name of the subscription.
*
* @param displayName the displayName value to set.
* @return the SubscriptionUnderManagementGroupProperties object itself.
*/
public SubscriptionUnderManagementGroupProperties withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Get the parent property: The ID of the parent management group.
*
* @return the parent value.
*/
public DescendantParentGroupInfo parent() {
return this.parent;
}
/**
* Set the parent property: The ID of the parent management group.
*
* @param parent the parent value to set.
* @return the SubscriptionUnderManagementGroupProperties object itself.
*/
public SubscriptionUnderManagementGroupProperties withParent(DescendantParentGroupInfo parent) {
this.parent = parent;
return this;
}
/**
* Get the state property: The state of the subscription.
*
* @return the state value.
*/
public String state() {
return this.state;
}
/**
* Set the state property: The state of the subscription.
*
* @param state the state value to set.
* @return the SubscriptionUnderManagementGroupProperties object itself.
*/
public SubscriptionUnderManagementGroupProperties withState(String state) {
this.state = state;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (parent() != null) {
parent().validate();
}
}
}