HubVirtualNetworkConnectionInner.java
// 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.annotation.JsonFlatten;
import com.azure.core.management.SubResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.network.models.ProvisioningState;
import com.azure.resourcemanager.network.models.RoutingConfiguration;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** HubVirtualNetworkConnection Resource. */
@JsonFlatten
@Fluent
public class HubVirtualNetworkConnectionInner extends SubResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(HubVirtualNetworkConnectionInner.class);
/*
* The name of the resource that is unique within a resource group. This
* name can be used to access the resource.
*/
@JsonProperty(value = "name")
private String name;
/*
* A unique read-only string that changes whenever the resource is updated.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
/*
* Reference to the remote virtual network.
*/
@JsonProperty(value = "properties.remoteVirtualNetwork")
private SubResource remoteVirtualNetwork;
/*
* Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
*/
@JsonProperty(value = "properties.allowHubToRemoteVnetTransit")
private Boolean allowHubToRemoteVnetTransit;
/*
* Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
*/
@JsonProperty(value = "properties.allowRemoteVnetToUseHubVnetGateways")
private Boolean allowRemoteVnetToUseHubVnetGateways;
/*
* Enable internet security.
*/
@JsonProperty(value = "properties.enableInternetSecurity")
private Boolean enableInternetSecurity;
/*
* The Routing Configuration indicating the associated and propagated route
* tables on this connection.
*/
@JsonProperty(value = "properties.routingConfiguration")
private RoutingConfiguration routingConfiguration;
/*
* The provisioning state of the hub virtual network connection resource.
*/
@JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningState provisioningState;
/**
* Get the name property: The name of the resource that is unique within a resource group. This name can be used to
* access the resource.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: The name of the resource that is unique within a resource group. This name can be used to
* access the resource.
*
* @param name the name value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withName(String name) {
this.name = name;
return this;
}
/**
* Get the etag property: A unique read-only string that changes whenever the resource is updated.
*
* @return the etag value.
*/
public String etag() {
return this.etag;
}
/**
* Get the remoteVirtualNetwork property: Reference to the remote virtual network.
*
* @return the remoteVirtualNetwork value.
*/
public SubResource remoteVirtualNetwork() {
return this.remoteVirtualNetwork;
}
/**
* Set the remoteVirtualNetwork property: Reference to the remote virtual network.
*
* @param remoteVirtualNetwork the remoteVirtualNetwork value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withRemoteVirtualNetwork(SubResource remoteVirtualNetwork) {
this.remoteVirtualNetwork = remoteVirtualNetwork;
return this;
}
/**
* Get the allowHubToRemoteVnetTransit property: Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
*
* @return the allowHubToRemoteVnetTransit value.
*/
public Boolean allowHubToRemoteVnetTransit() {
return this.allowHubToRemoteVnetTransit;
}
/**
* Set the allowHubToRemoteVnetTransit property: Deprecated: VirtualHub to RemoteVnet transit to enabled or not.
*
* @param allowHubToRemoteVnetTransit the allowHubToRemoteVnetTransit value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withAllowHubToRemoteVnetTransit(Boolean allowHubToRemoteVnetTransit) {
this.allowHubToRemoteVnetTransit = allowHubToRemoteVnetTransit;
return this;
}
/**
* Get the allowRemoteVnetToUseHubVnetGateways property: Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
*
* @return the allowRemoteVnetToUseHubVnetGateways value.
*/
public Boolean allowRemoteVnetToUseHubVnetGateways() {
return this.allowRemoteVnetToUseHubVnetGateways;
}
/**
* Set the allowRemoteVnetToUseHubVnetGateways property: Deprecated: Allow RemoteVnet to use Virtual Hub's gateways.
*
* @param allowRemoteVnetToUseHubVnetGateways the allowRemoteVnetToUseHubVnetGateways value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withAllowRemoteVnetToUseHubVnetGateways(
Boolean allowRemoteVnetToUseHubVnetGateways) {
this.allowRemoteVnetToUseHubVnetGateways = allowRemoteVnetToUseHubVnetGateways;
return this;
}
/**
* Get the enableInternetSecurity property: Enable internet security.
*
* @return the enableInternetSecurity value.
*/
public Boolean enableInternetSecurity() {
return this.enableInternetSecurity;
}
/**
* Set the enableInternetSecurity property: Enable internet security.
*
* @param enableInternetSecurity the enableInternetSecurity value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withEnableInternetSecurity(Boolean enableInternetSecurity) {
this.enableInternetSecurity = enableInternetSecurity;
return this;
}
/**
* Get the routingConfiguration property: The Routing Configuration indicating the associated and propagated route
* tables on this connection.
*
* @return the routingConfiguration value.
*/
public RoutingConfiguration routingConfiguration() {
return this.routingConfiguration;
}
/**
* Set the routingConfiguration property: The Routing Configuration indicating the associated and propagated route
* tables on this connection.
*
* @param routingConfiguration the routingConfiguration value to set.
* @return the HubVirtualNetworkConnectionInner object itself.
*/
public HubVirtualNetworkConnectionInner withRoutingConfiguration(RoutingConfiguration routingConfiguration) {
this.routingConfiguration = routingConfiguration;
return this;
}
/**
* Get the provisioningState property: The provisioning state of the hub virtual network connection resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (routingConfiguration() != null) {
routingConfiguration().validate();
}
}
}