com.azure.resourcemanager.network.fluent.models.ConnectivityConfigurationInner 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
The 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.Fluent;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.network.models.ChildResource;
import com.azure.resourcemanager.network.models.ConnectivityGroupItem;
import com.azure.resourcemanager.network.models.ConnectivityTopology;
import com.azure.resourcemanager.network.models.DeleteExistingPeering;
import com.azure.resourcemanager.network.models.Hub;
import com.azure.resourcemanager.network.models.IsGlobal;
import com.azure.resourcemanager.network.models.ProvisioningState;
import java.io.IOException;
import java.util.List;
/**
* The network manager connectivity configuration resource.
*/
@Fluent
public final class ConnectivityConfigurationInner extends ChildResource {
/*
* Properties of a network manager connectivity configuration
*/
private ConnectivityConfigurationProperties innerProperties;
/*
* The system metadata related to this resource.
*/
private SystemData systemData;
/*
* A unique read-only string that changes whenever the resource is updated.
*/
private String etag;
/*
* The type of the resource.
*/
private String type;
/*
* The name of the resource.
*/
private String name;
/*
* Fully qualified resource Id for the resource.
*/
private String id;
/**
* Creates an instance of ConnectivityConfigurationInner class.
*/
public ConnectivityConfigurationInner() {
}
/**
* Get the innerProperties property: Properties of a network manager connectivity configuration.
*
* @return the innerProperties value.
*/
private ConnectivityConfigurationProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the systemData property: The system metadata related to this resource.
*
* @return the systemData value.
*/
public SystemData systemData() {
return this.systemData;
}
/**
* Get the etag property: A unique read-only string that changes whenever the resource is updated.
*
* @return the etag value.
*/
@Override
public String etag() {
return this.etag;
}
/**
* Get the type property: The type of the resource.
*
* @return the type value.
*/
@Override
public String type() {
return this.type;
}
/**
* Get the name property: The name of the resource.
*
* @return the name value.
*/
@Override
public String name() {
return this.name;
}
/**
* Get the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
@Override
public String id() {
return this.id;
}
/**
* Get the description property: A description of the connectivity configuration.
*
* @return the description value.
*/
public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
* Set the description property: A description of the connectivity configuration.
*
* @param description the description value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withDescription(String description) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withDescription(description);
return this;
}
/**
* Get the connectivityTopology property: Connectivity topology type.
*
* @return the connectivityTopology value.
*/
public ConnectivityTopology connectivityTopology() {
return this.innerProperties() == null ? null : this.innerProperties().connectivityTopology();
}
/**
* Set the connectivityTopology property: Connectivity topology type.
*
* @param connectivityTopology the connectivityTopology value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withConnectivityTopology(ConnectivityTopology connectivityTopology) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withConnectivityTopology(connectivityTopology);
return this;
}
/**
* Get the hubs property: List of hubItems.
*
* @return the hubs value.
*/
public List hubs() {
return this.innerProperties() == null ? null : this.innerProperties().hubs();
}
/**
* Set the hubs property: List of hubItems.
*
* @param hubs the hubs value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withHubs(List hubs) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withHubs(hubs);
return this;
}
/**
* Get the isGlobal property: Flag if global mesh is supported.
*
* @return the isGlobal value.
*/
public IsGlobal isGlobal() {
return this.innerProperties() == null ? null : this.innerProperties().isGlobal();
}
/**
* Set the isGlobal property: Flag if global mesh is supported.
*
* @param isGlobal the isGlobal value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withIsGlobal(IsGlobal isGlobal) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withIsGlobal(isGlobal);
return this;
}
/**
* Get the appliesToGroups property: Groups for configuration.
*
* @return the appliesToGroups value.
*/
public List appliesToGroups() {
return this.innerProperties() == null ? null : this.innerProperties().appliesToGroups();
}
/**
* Set the appliesToGroups property: Groups for configuration.
*
* @param appliesToGroups the appliesToGroups value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withAppliesToGroups(List appliesToGroups) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withAppliesToGroups(appliesToGroups);
return this;
}
/**
* Get the provisioningState property: The provisioning state of the connectivity configuration resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
* Get the deleteExistingPeering property: Flag if need to remove current existing peerings.
*
* @return the deleteExistingPeering value.
*/
public DeleteExistingPeering deleteExistingPeering() {
return this.innerProperties() == null ? null : this.innerProperties().deleteExistingPeering();
}
/**
* Set the deleteExistingPeering property: Flag if need to remove current existing peerings.
*
* @param deleteExistingPeering the deleteExistingPeering value to set.
* @return the ConnectivityConfigurationInner object itself.
*/
public ConnectivityConfigurationInner withDeleteExistingPeering(DeleteExistingPeering deleteExistingPeering) {
if (this.innerProperties() == null) {
this.innerProperties = new ConnectivityConfigurationProperties();
}
this.innerProperties().withDeleteExistingPeering(deleteExistingPeering);
return this;
}
/**
* Get the resourceGuid property: Unique identifier for this resource.
*
* @return the resourceGuid value.
*/
public String resourceGuid() {
return this.innerProperties() == null ? null : this.innerProperties().resourceGuid();
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ConnectivityConfigurationInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ConnectivityConfigurationInner if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ConnectivityConfigurationInner.
*/
public static ConnectivityConfigurationInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ConnectivityConfigurationInner deserializedConnectivityConfigurationInner
= new ConnectivityConfigurationInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("id".equals(fieldName)) {
deserializedConnectivityConfigurationInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedConnectivityConfigurationInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedConnectivityConfigurationInner.type = reader.getString();
} else if ("etag".equals(fieldName)) {
deserializedConnectivityConfigurationInner.etag = reader.getString();
} else if ("properties".equals(fieldName)) {
deserializedConnectivityConfigurationInner.innerProperties
= ConnectivityConfigurationProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedConnectivityConfigurationInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedConnectivityConfigurationInner;
});
}
}