com.azure.resourcemanager.network.fluent.models.BaseAdminRuleInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-network Show documentation
Show all versions of azure-resourcemanager-network Show documentation
This package contains Microsoft Azure Network Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.fluent.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.network.models.AdminRule;
import com.azure.resourcemanager.network.models.AdminRuleKind;
import com.azure.resourcemanager.network.models.ChildResource;
import com.azure.resourcemanager.network.models.DefaultAdminRule;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Network base admin rule.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", defaultImpl = BaseAdminRuleInner.class, visible = true)
@JsonTypeName("BaseAdminRule")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Custom", value = AdminRule.class),
@JsonSubTypes.Type(name = "Default", value = DefaultAdminRule.class) })
@Immutable
public class BaseAdminRuleInner extends ChildResource {
/*
* Whether the rule is custom or default.
*/
@JsonTypeId
@JsonProperty(value = "kind", required = true)
private AdminRuleKind kind;
/*
* The system metadata related to this resource.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
/**
* Creates an instance of BaseAdminRuleInner class.
*/
public BaseAdminRuleInner() {
this.kind = AdminRuleKind.fromString("BaseAdminRule");
}
/**
* Get the kind property: Whether the rule is custom or default.
*
* @return the kind value.
*/
public AdminRuleKind kind() {
return this.kind;
}
/**
* Get the systemData property: The system metadata related to this resource.
*
* @return the systemData value.
*/
public SystemData systemData() {
return this.systemData;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
}
}