1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License.
3 // Code generated by Microsoft (R) AutoRest Code Generator
4
5 package com.microsoft.azure.batch.protocol.models;
6
7 import com.fasterxml.jackson.annotation.JsonProperty;
8
9 /**
10 * The network configuration for a pool.
11 */
12 public class NetworkConfiguration {
13 /**
14 * The ARM resource identifier of the virtual network subnet which the
15 * compute nodes of the pool will join.
16 * This is of the form
17 * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}.
18 * The virtual network must be in the same region and subscription as the
19 * Azure Batch account. The specified subnet should have enough free IP
20 * addresses to accommodate the number of nodes in the pool. If the subnet
21 * doesn't have enough free IP addresses, the pool will partially allocate
22 * compute nodes, and a resize error will occur. For pools created with
23 * virtualMachineConfiguration only ARM virtual networks
24 * ('Microsoft.Network/virtualNetworks') are supported, but for pools
25 * created with cloudServiceConfiguration both ARM and classic virtual
26 * networks are supported. For more details, see:
27 * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
28 */
29 @JsonProperty(value = "subnetId")
30 private String subnetId;
31
32 /**
33 * The scope of dynamic vnet assignment.
34 * Possible values include: 'none', 'job'.
35 */
36 @JsonProperty(value = "dynamicVNetAssignmentScope")
37 private DynamicVNetAssignmentScope dynamicVNetAssignmentScope;
38
39 /**
40 * The configuration for endpoints on compute nodes in the Batch pool.
41 * Pool endpoint configuration is only supported on pools with the
42 * virtualMachineConfiguration property.
43 */
44 @JsonProperty(value = "endpointConfiguration")
45 private PoolEndpointConfiguration endpointConfiguration;
46
47 /**
48 * Get this is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. For pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for pools created with cloudServiceConfiguration both ARM and classic virtual networks are supported. For more details, see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
49 *
50 * @return the subnetId value
51 */
52 public String subnetId() {
53 return this.subnetId;
54 }
55
56 /**
57 * Set this is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. For pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported, but for pools created with cloudServiceConfiguration both ARM and classic virtual networks are supported. For more details, see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
58 *
59 * @param subnetId the subnetId value to set
60 * @return the NetworkConfiguration object itself.
61 */
62 public NetworkConfiguration withSubnetId(String subnetId) {
63 this.subnetId = subnetId;
64 return this;
65 }
66
67 /**
68 * Get possible values include: 'none', 'job'.
69 *
70 * @return the dynamicVNetAssignmentScope value
71 */
72 public DynamicVNetAssignmentScope dynamicVNetAssignmentScope() {
73 return this.dynamicVNetAssignmentScope;
74 }
75
76 /**
77 * Set possible values include: 'none', 'job'.
78 *
79 * @param dynamicVNetAssignmentScope the dynamicVNetAssignmentScope value to set
80 * @return the NetworkConfiguration object itself.
81 */
82 public NetworkConfiguration withDynamicVNetAssignmentScope(DynamicVNetAssignmentScope dynamicVNetAssignmentScope) {
83 this.dynamicVNetAssignmentScope = dynamicVNetAssignmentScope;
84 return this;
85 }
86
87 /**
88 * Get pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
89 *
90 * @return the endpointConfiguration value
91 */
92 public PoolEndpointConfiguration endpointConfiguration() {
93 return this.endpointConfiguration;
94 }
95
96 /**
97 * Set pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.
98 *
99 * @param endpointConfiguration the endpointConfiguration value to set
100 * @return the NetworkConfiguration object itself.
101 */
102 public NetworkConfiguration withEndpointConfiguration(PoolEndpointConfiguration endpointConfiguration) {
103 this.endpointConfiguration = endpointConfiguration;
104 return this;
105 }
106
107 }