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

com.azure.resourcemanager.network.fluent.models.BaseAdminRuleInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Network Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

There is a newer version: 2.44.0
Show newest version
// 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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy