1package network 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/azure" 24 "github.com/Azure/go-autorest/autorest/date" 25 "github.com/Azure/go-autorest/autorest/to" 26 "net/http" 27) 28 29// Access enumerates the values for access. 30type Access string 31 32const ( 33 // Allow ... 34 Allow Access = "Allow" 35 // Deny ... 36 Deny Access = "Deny" 37) 38 39// PossibleAccessValues returns an array of possible values for the Access const type. 40func PossibleAccessValues() []Access { 41 return []Access{Allow, Deny} 42} 43 44// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health 45// server health. 46type ApplicationGatewayBackendHealthServerHealth string 47 48const ( 49 // Down ... 50 Down ApplicationGatewayBackendHealthServerHealth = "Down" 51 // Draining ... 52 Draining ApplicationGatewayBackendHealthServerHealth = "Draining" 53 // Partial ... 54 Partial ApplicationGatewayBackendHealthServerHealth = "Partial" 55 // Unknown ... 56 Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" 57 // Up ... 58 Up ApplicationGatewayBackendHealthServerHealth = "Up" 59) 60 61// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type. 62func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { 63 return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up} 64} 65 66// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. 67type ApplicationGatewayCookieBasedAffinity string 68 69const ( 70 // Disabled ... 71 Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" 72 // Enabled ... 73 Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" 74) 75 76// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type. 77func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { 78 return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled} 79} 80 81// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. 82type ApplicationGatewayFirewallMode string 83 84const ( 85 // Detection ... 86 Detection ApplicationGatewayFirewallMode = "Detection" 87 // Prevention ... 88 Prevention ApplicationGatewayFirewallMode = "Prevention" 89) 90 91// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type. 92func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { 93 return []ApplicationGatewayFirewallMode{Detection, Prevention} 94} 95 96// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. 97type ApplicationGatewayOperationalState string 98 99const ( 100 // Running ... 101 Running ApplicationGatewayOperationalState = "Running" 102 // Starting ... 103 Starting ApplicationGatewayOperationalState = "Starting" 104 // Stopped ... 105 Stopped ApplicationGatewayOperationalState = "Stopped" 106 // Stopping ... 107 Stopping ApplicationGatewayOperationalState = "Stopping" 108) 109 110// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type. 111func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { 112 return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping} 113} 114 115// ApplicationGatewayProtocol enumerates the values for application gateway protocol. 116type ApplicationGatewayProtocol string 117 118const ( 119 // HTTP ... 120 HTTP ApplicationGatewayProtocol = "Http" 121 // HTTPS ... 122 HTTPS ApplicationGatewayProtocol = "Https" 123) 124 125// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. 126func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { 127 return []ApplicationGatewayProtocol{HTTP, HTTPS} 128} 129 130// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. 131type ApplicationGatewayRedirectType string 132 133const ( 134 // Found ... 135 Found ApplicationGatewayRedirectType = "Found" 136 // Permanent ... 137 Permanent ApplicationGatewayRedirectType = "Permanent" 138 // SeeOther ... 139 SeeOther ApplicationGatewayRedirectType = "SeeOther" 140 // Temporary ... 141 Temporary ApplicationGatewayRedirectType = "Temporary" 142) 143 144// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type. 145func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { 146 return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary} 147} 148 149// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule 150// type. 151type ApplicationGatewayRequestRoutingRuleType string 152 153const ( 154 // Basic ... 155 Basic ApplicationGatewayRequestRoutingRuleType = "Basic" 156 // PathBasedRouting ... 157 PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" 158) 159 160// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type. 161func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { 162 return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting} 163} 164 165// ApplicationGatewaySkuName enumerates the values for application gateway sku name. 166type ApplicationGatewaySkuName string 167 168const ( 169 // StandardLarge ... 170 StandardLarge ApplicationGatewaySkuName = "Standard_Large" 171 // StandardMedium ... 172 StandardMedium ApplicationGatewaySkuName = "Standard_Medium" 173 // StandardSmall ... 174 StandardSmall ApplicationGatewaySkuName = "Standard_Small" 175 // WAFLarge ... 176 WAFLarge ApplicationGatewaySkuName = "WAF_Large" 177 // WAFMedium ... 178 WAFMedium ApplicationGatewaySkuName = "WAF_Medium" 179) 180 181// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type. 182func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName { 183 return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, WAFLarge, WAFMedium} 184} 185 186// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. 187type ApplicationGatewaySslCipherSuite string 188 189const ( 190 // TLSDHEDSSWITHAES128CBCSHA ... 191 TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" 192 // TLSDHEDSSWITHAES128CBCSHA256 ... 193 TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" 194 // TLSDHEDSSWITHAES256CBCSHA ... 195 TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" 196 // TLSDHEDSSWITHAES256CBCSHA256 ... 197 TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" 198 // TLSDHERSAWITHAES128CBCSHA ... 199 TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" 200 // TLSDHERSAWITHAES128GCMSHA256 ... 201 TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" 202 // TLSDHERSAWITHAES256CBCSHA ... 203 TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" 204 // TLSDHERSAWITHAES256GCMSHA384 ... 205 TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" 206 // TLSECDHEECDSAWITHAES128CBCSHA ... 207 TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" 208 // TLSECDHEECDSAWITHAES128CBCSHA256 ... 209 TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" 210 // TLSECDHEECDSAWITHAES128GCMSHA256 ... 211 TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" 212 // TLSECDHEECDSAWITHAES256CBCSHA ... 213 TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" 214 // TLSECDHEECDSAWITHAES256CBCSHA384 ... 215 TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" 216 // TLSECDHEECDSAWITHAES256GCMSHA384 ... 217 TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" 218 // TLSECDHERSAWITHAES128CBCSHA ... 219 TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" 220 // TLSECDHERSAWITHAES128CBCSHA256 ... 221 TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" 222 // TLSECDHERSAWITHAES256CBCSHA ... 223 TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 224 // TLSECDHERSAWITHAES256CBCSHA384 ... 225 TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" 226 // TLSRSAWITH3DESEDECBCSHA ... 227 TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" 228 // TLSRSAWITHAES128CBCSHA ... 229 TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" 230 // TLSRSAWITHAES128CBCSHA256 ... 231 TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" 232 // TLSRSAWITHAES128GCMSHA256 ... 233 TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" 234 // TLSRSAWITHAES256CBCSHA ... 235 TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" 236 // TLSRSAWITHAES256CBCSHA256 ... 237 TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" 238 // TLSRSAWITHAES256GCMSHA384 ... 239 TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" 240) 241 242// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type. 243func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite { 244 return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384} 245} 246 247// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. 248type ApplicationGatewaySslPolicyName string 249 250const ( 251 // AppGwSslPolicy20150501 ... 252 AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" 253 // AppGwSslPolicy20170401 ... 254 AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" 255 // AppGwSslPolicy20170401S ... 256 AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" 257) 258 259// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type. 260func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName { 261 return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S} 262} 263 264// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. 265type ApplicationGatewaySslPolicyType string 266 267const ( 268 // Custom ... 269 Custom ApplicationGatewaySslPolicyType = "Custom" 270 // Predefined ... 271 Predefined ApplicationGatewaySslPolicyType = "Predefined" 272) 273 274// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type. 275func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType { 276 return []ApplicationGatewaySslPolicyType{Custom, Predefined} 277} 278 279// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. 280type ApplicationGatewaySslProtocol string 281 282const ( 283 // TLSv10 ... 284 TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" 285 // TLSv11 ... 286 TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" 287 // TLSv12 ... 288 TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" 289) 290 291// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type. 292func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol { 293 return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12} 294} 295 296// ApplicationGatewayTier enumerates the values for application gateway tier. 297type ApplicationGatewayTier string 298 299const ( 300 // Standard ... 301 Standard ApplicationGatewayTier = "Standard" 302 // WAF ... 303 WAF ApplicationGatewayTier = "WAF" 304) 305 306// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type. 307func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { 308 return []ApplicationGatewayTier{Standard, WAF} 309} 310 311// AssociationType enumerates the values for association type. 312type AssociationType string 313 314const ( 315 // Associated ... 316 Associated AssociationType = "Associated" 317 // Contains ... 318 Contains AssociationType = "Contains" 319) 320 321// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type. 322func PossibleAssociationTypeValues() []AssociationType { 323 return []AssociationType{Associated, Contains} 324} 325 326// AuthenticationMethod enumerates the values for authentication method. 327type AuthenticationMethod string 328 329const ( 330 // EAPMSCHAPv2 ... 331 EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" 332 // EAPTLS ... 333 EAPTLS AuthenticationMethod = "EAPTLS" 334) 335 336// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type. 337func PossibleAuthenticationMethodValues() []AuthenticationMethod { 338 return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS} 339} 340 341// AuthorizationUseStatus enumerates the values for authorization use status. 342type AuthorizationUseStatus string 343 344const ( 345 // Available ... 346 Available AuthorizationUseStatus = "Available" 347 // InUse ... 348 InUse AuthorizationUseStatus = "InUse" 349) 350 351// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type. 352func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { 353 return []AuthorizationUseStatus{Available, InUse} 354} 355 356// BgpPeerState enumerates the values for bgp peer state. 357type BgpPeerState string 358 359const ( 360 // BgpPeerStateConnected ... 361 BgpPeerStateConnected BgpPeerState = "Connected" 362 // BgpPeerStateConnecting ... 363 BgpPeerStateConnecting BgpPeerState = "Connecting" 364 // BgpPeerStateIdle ... 365 BgpPeerStateIdle BgpPeerState = "Idle" 366 // BgpPeerStateStopped ... 367 BgpPeerStateStopped BgpPeerState = "Stopped" 368 // BgpPeerStateUnknown ... 369 BgpPeerStateUnknown BgpPeerState = "Unknown" 370) 371 372// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type. 373func PossibleBgpPeerStateValues() []BgpPeerState { 374 return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown} 375} 376 377// CircuitConnectionStatus enumerates the values for circuit connection status. 378type CircuitConnectionStatus string 379 380const ( 381 // Connected ... 382 Connected CircuitConnectionStatus = "Connected" 383 // Connecting ... 384 Connecting CircuitConnectionStatus = "Connecting" 385 // Disconnected ... 386 Disconnected CircuitConnectionStatus = "Disconnected" 387) 388 389// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type. 390func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { 391 return []CircuitConnectionStatus{Connected, Connecting, Disconnected} 392} 393 394// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status. 395type ConnectionMonitorSourceStatus string 396 397const ( 398 // Active ... 399 Active ConnectionMonitorSourceStatus = "Active" 400 // Inactive ... 401 Inactive ConnectionMonitorSourceStatus = "Inactive" 402 // Uknown ... 403 Uknown ConnectionMonitorSourceStatus = "Uknown" 404) 405 406// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type. 407func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { 408 return []ConnectionMonitorSourceStatus{Active, Inactive, Uknown} 409} 410 411// ConnectionState enumerates the values for connection state. 412type ConnectionState string 413 414const ( 415 // ConnectionStateReachable ... 416 ConnectionStateReachable ConnectionState = "Reachable" 417 // ConnectionStateUnknown ... 418 ConnectionStateUnknown ConnectionState = "Unknown" 419 // ConnectionStateUnreachable ... 420 ConnectionStateUnreachable ConnectionState = "Unreachable" 421) 422 423// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type. 424func PossibleConnectionStateValues() []ConnectionState { 425 return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable} 426} 427 428// ConnectionStatus enumerates the values for connection status. 429type ConnectionStatus string 430 431const ( 432 // ConnectionStatusConnected ... 433 ConnectionStatusConnected ConnectionStatus = "Connected" 434 // ConnectionStatusDegraded ... 435 ConnectionStatusDegraded ConnectionStatus = "Degraded" 436 // ConnectionStatusDisconnected ... 437 ConnectionStatusDisconnected ConnectionStatus = "Disconnected" 438 // ConnectionStatusUnknown ... 439 ConnectionStatusUnknown ConnectionStatus = "Unknown" 440) 441 442// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type. 443func PossibleConnectionStatusValues() []ConnectionStatus { 444 return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} 445} 446 447// DhGroup enumerates the values for dh group. 448type DhGroup string 449 450const ( 451 // DHGroup1 ... 452 DHGroup1 DhGroup = "DHGroup1" 453 // DHGroup14 ... 454 DHGroup14 DhGroup = "DHGroup14" 455 // DHGroup2 ... 456 DHGroup2 DhGroup = "DHGroup2" 457 // DHGroup2048 ... 458 DHGroup2048 DhGroup = "DHGroup2048" 459 // DHGroup24 ... 460 DHGroup24 DhGroup = "DHGroup24" 461 // ECP256 ... 462 ECP256 DhGroup = "ECP256" 463 // ECP384 ... 464 ECP384 DhGroup = "ECP384" 465 // None ... 466 None DhGroup = "None" 467) 468 469// PossibleDhGroupValues returns an array of possible values for the DhGroup const type. 470func PossibleDhGroupValues() []DhGroup { 471 return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None} 472} 473 474// Direction enumerates the values for direction. 475type Direction string 476 477const ( 478 // Inbound ... 479 Inbound Direction = "Inbound" 480 // Outbound ... 481 Outbound Direction = "Outbound" 482) 483 484// PossibleDirectionValues returns an array of possible values for the Direction const type. 485func PossibleDirectionValues() []Direction { 486 return []Direction{Inbound, Outbound} 487} 488 489// EffectiveRouteSource enumerates the values for effective route source. 490type EffectiveRouteSource string 491 492const ( 493 // EffectiveRouteSourceDefault ... 494 EffectiveRouteSourceDefault EffectiveRouteSource = "Default" 495 // EffectiveRouteSourceUnknown ... 496 EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" 497 // EffectiveRouteSourceUser ... 498 EffectiveRouteSourceUser EffectiveRouteSource = "User" 499 // EffectiveRouteSourceVirtualNetworkGateway ... 500 EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" 501) 502 503// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type. 504func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { 505 return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway} 506} 507 508// EffectiveRouteState enumerates the values for effective route state. 509type EffectiveRouteState string 510 511const ( 512 // EffectiveRouteStateActive ... 513 EffectiveRouteStateActive EffectiveRouteState = "Active" 514 // EffectiveRouteStateInvalid ... 515 EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" 516) 517 518// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. 519func PossibleEffectiveRouteStateValues() []EffectiveRouteState { 520 return []EffectiveRouteState{EffectiveRouteStateActive, EffectiveRouteStateInvalid} 521} 522 523// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. 524type EffectiveSecurityRuleProtocol string 525 526const ( 527 // All ... 528 All EffectiveSecurityRuleProtocol = "All" 529 // TCP ... 530 TCP EffectiveSecurityRuleProtocol = "Tcp" 531 // UDP ... 532 UDP EffectiveSecurityRuleProtocol = "Udp" 533) 534 535// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type. 536func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { 537 return []EffectiveSecurityRuleProtocol{All, TCP, UDP} 538} 539 540// EvaluationState enumerates the values for evaluation state. 541type EvaluationState string 542 543const ( 544 // Completed ... 545 Completed EvaluationState = "Completed" 546 // InProgress ... 547 InProgress EvaluationState = "InProgress" 548 // NotStarted ... 549 NotStarted EvaluationState = "NotStarted" 550) 551 552// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type. 553func PossibleEvaluationStateValues() []EvaluationState { 554 return []EvaluationState{Completed, InProgress, NotStarted} 555} 556 557// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit 558// peering advertised public prefix state. 559type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string 560 561const ( 562 // Configured ... 563 Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" 564 // Configuring ... 565 Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" 566 // NotConfigured ... 567 NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" 568 // ValidationNeeded ... 569 ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" 570) 571 572// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. 573func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { 574 return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded} 575} 576 577// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. 578type ExpressRouteCircuitPeeringState string 579 580const ( 581 // ExpressRouteCircuitPeeringStateDisabled ... 582 ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" 583 // ExpressRouteCircuitPeeringStateEnabled ... 584 ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" 585) 586 587// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type. 588func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { 589 return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled} 590} 591 592// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. 593type ExpressRouteCircuitSkuFamily string 594 595const ( 596 // MeteredData ... 597 MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" 598 // UnlimitedData ... 599 UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" 600) 601 602// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type. 603func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily { 604 return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData} 605} 606 607// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. 608type ExpressRouteCircuitSkuTier string 609 610const ( 611 // ExpressRouteCircuitSkuTierPremium ... 612 ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" 613 // ExpressRouteCircuitSkuTierStandard ... 614 ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" 615) 616 617// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. 618func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { 619 return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} 620} 621 622// ExpressRoutePeeringState enumerates the values for express route peering state. 623type ExpressRoutePeeringState string 624 625const ( 626 // ExpressRoutePeeringStateDisabled ... 627 ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" 628 // ExpressRoutePeeringStateEnabled ... 629 ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" 630) 631 632// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type. 633func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { 634 return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled} 635} 636 637// ExpressRoutePeeringType enumerates the values for express route peering type. 638type ExpressRoutePeeringType string 639 640const ( 641 // AzurePrivatePeering ... 642 AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" 643 // AzurePublicPeering ... 644 AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" 645 // MicrosoftPeering ... 646 MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" 647) 648 649// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type. 650func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { 651 return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering} 652} 653 654// HTTPMethod enumerates the values for http method. 655type HTTPMethod string 656 657const ( 658 // Get ... 659 Get HTTPMethod = "Get" 660) 661 662// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type. 663func PossibleHTTPMethodValues() []HTTPMethod { 664 return []HTTPMethod{Get} 665} 666 667// IkeEncryption enumerates the values for ike encryption. 668type IkeEncryption string 669 670const ( 671 // AES128 ... 672 AES128 IkeEncryption = "AES128" 673 // AES192 ... 674 AES192 IkeEncryption = "AES192" 675 // AES256 ... 676 AES256 IkeEncryption = "AES256" 677 // DES ... 678 DES IkeEncryption = "DES" 679 // DES3 ... 680 DES3 IkeEncryption = "DES3" 681 // GCMAES128 ... 682 GCMAES128 IkeEncryption = "GCMAES128" 683 // GCMAES256 ... 684 GCMAES256 IkeEncryption = "GCMAES256" 685) 686 687// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type. 688func PossibleIkeEncryptionValues() []IkeEncryption { 689 return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256} 690} 691 692// IkeIntegrity enumerates the values for ike integrity. 693type IkeIntegrity string 694 695const ( 696 // IkeIntegrityGCMAES128 ... 697 IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" 698 // IkeIntegrityGCMAES256 ... 699 IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" 700 // IkeIntegrityMD5 ... 701 IkeIntegrityMD5 IkeIntegrity = "MD5" 702 // IkeIntegritySHA1 ... 703 IkeIntegritySHA1 IkeIntegrity = "SHA1" 704 // IkeIntegritySHA256 ... 705 IkeIntegritySHA256 IkeIntegrity = "SHA256" 706 // IkeIntegritySHA384 ... 707 IkeIntegritySHA384 IkeIntegrity = "SHA384" 708) 709 710// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type. 711func PossibleIkeIntegrityValues() []IkeIntegrity { 712 return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384} 713} 714 715// IPAllocationMethod enumerates the values for ip allocation method. 716type IPAllocationMethod string 717 718const ( 719 // Dynamic ... 720 Dynamic IPAllocationMethod = "Dynamic" 721 // Static ... 722 Static IPAllocationMethod = "Static" 723) 724 725// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type. 726func PossibleIPAllocationMethodValues() []IPAllocationMethod { 727 return []IPAllocationMethod{Dynamic, Static} 728} 729 730// IPFlowProtocol enumerates the values for ip flow protocol. 731type IPFlowProtocol string 732 733const ( 734 // IPFlowProtocolTCP ... 735 IPFlowProtocolTCP IPFlowProtocol = "TCP" 736 // IPFlowProtocolUDP ... 737 IPFlowProtocolUDP IPFlowProtocol = "UDP" 738) 739 740// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type. 741func PossibleIPFlowProtocolValues() []IPFlowProtocol { 742 return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP} 743} 744 745// IpsecEncryption enumerates the values for ipsec encryption. 746type IpsecEncryption string 747 748const ( 749 // IpsecEncryptionAES128 ... 750 IpsecEncryptionAES128 IpsecEncryption = "AES128" 751 // IpsecEncryptionAES192 ... 752 IpsecEncryptionAES192 IpsecEncryption = "AES192" 753 // IpsecEncryptionAES256 ... 754 IpsecEncryptionAES256 IpsecEncryption = "AES256" 755 // IpsecEncryptionDES ... 756 IpsecEncryptionDES IpsecEncryption = "DES" 757 // IpsecEncryptionDES3 ... 758 IpsecEncryptionDES3 IpsecEncryption = "DES3" 759 // IpsecEncryptionGCMAES128 ... 760 IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" 761 // IpsecEncryptionGCMAES192 ... 762 IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" 763 // IpsecEncryptionGCMAES256 ... 764 IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" 765 // IpsecEncryptionNone ... 766 IpsecEncryptionNone IpsecEncryption = "None" 767) 768 769// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type. 770func PossibleIpsecEncryptionValues() []IpsecEncryption { 771 return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone} 772} 773 774// IpsecIntegrity enumerates the values for ipsec integrity. 775type IpsecIntegrity string 776 777const ( 778 // IpsecIntegrityGCMAES128 ... 779 IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" 780 // IpsecIntegrityGCMAES192 ... 781 IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" 782 // IpsecIntegrityGCMAES256 ... 783 IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" 784 // IpsecIntegrityMD5 ... 785 IpsecIntegrityMD5 IpsecIntegrity = "MD5" 786 // IpsecIntegritySHA1 ... 787 IpsecIntegritySHA1 IpsecIntegrity = "SHA1" 788 // IpsecIntegritySHA256 ... 789 IpsecIntegritySHA256 IpsecIntegrity = "SHA256" 790) 791 792// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type. 793func PossibleIpsecIntegrityValues() []IpsecIntegrity { 794 return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256} 795} 796 797// IPVersion enumerates the values for ip version. 798type IPVersion string 799 800const ( 801 // IPv4 ... 802 IPv4 IPVersion = "IPv4" 803 // IPv6 ... 804 IPv6 IPVersion = "IPv6" 805) 806 807// PossibleIPVersionValues returns an array of possible values for the IPVersion const type. 808func PossibleIPVersionValues() []IPVersion { 809 return []IPVersion{IPv4, IPv6} 810} 811 812// IssueType enumerates the values for issue type. 813type IssueType string 814 815const ( 816 // IssueTypeAgentStopped ... 817 IssueTypeAgentStopped IssueType = "AgentStopped" 818 // IssueTypeDNSResolution ... 819 IssueTypeDNSResolution IssueType = "DnsResolution" 820 // IssueTypeGuestFirewall ... 821 IssueTypeGuestFirewall IssueType = "GuestFirewall" 822 // IssueTypeNetworkSecurityRule ... 823 IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" 824 // IssueTypePlatform ... 825 IssueTypePlatform IssueType = "Platform" 826 // IssueTypePortThrottled ... 827 IssueTypePortThrottled IssueType = "PortThrottled" 828 // IssueTypeSocketBind ... 829 IssueTypeSocketBind IssueType = "SocketBind" 830 // IssueTypeUnknown ... 831 IssueTypeUnknown IssueType = "Unknown" 832 // IssueTypeUserDefinedRoute ... 833 IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" 834) 835 836// PossibleIssueTypeValues returns an array of possible values for the IssueType const type. 837func PossibleIssueTypeValues() []IssueType { 838 return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} 839} 840 841// LoadBalancerSkuName enumerates the values for load balancer sku name. 842type LoadBalancerSkuName string 843 844const ( 845 // LoadBalancerSkuNameBasic ... 846 LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" 847 // LoadBalancerSkuNameStandard ... 848 LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" 849) 850 851// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. 852func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { 853 return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} 854} 855 856// LoadDistribution enumerates the values for load distribution. 857type LoadDistribution string 858 859const ( 860 // Default ... 861 Default LoadDistribution = "Default" 862 // SourceIP ... 863 SourceIP LoadDistribution = "SourceIP" 864 // SourceIPProtocol ... 865 SourceIPProtocol LoadDistribution = "SourceIPProtocol" 866) 867 868// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. 869func PossibleLoadDistributionValues() []LoadDistribution { 870 return []LoadDistribution{Default, SourceIP, SourceIPProtocol} 871} 872 873// NextHopType enumerates the values for next hop type. 874type NextHopType string 875 876const ( 877 // NextHopTypeHyperNetGateway ... 878 NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" 879 // NextHopTypeInternet ... 880 NextHopTypeInternet NextHopType = "Internet" 881 // NextHopTypeNone ... 882 NextHopTypeNone NextHopType = "None" 883 // NextHopTypeVirtualAppliance ... 884 NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" 885 // NextHopTypeVirtualNetworkGateway ... 886 NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" 887 // NextHopTypeVnetLocal ... 888 NextHopTypeVnetLocal NextHopType = "VnetLocal" 889) 890 891// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type. 892func PossibleNextHopTypeValues() []NextHopType { 893 return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal} 894} 895 896// OperationStatus enumerates the values for operation status. 897type OperationStatus string 898 899const ( 900 // OperationStatusFailed ... 901 OperationStatusFailed OperationStatus = "Failed" 902 // OperationStatusInProgress ... 903 OperationStatusInProgress OperationStatus = "InProgress" 904 // OperationStatusSucceeded ... 905 OperationStatusSucceeded OperationStatus = "Succeeded" 906) 907 908// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type. 909func PossibleOperationStatusValues() []OperationStatus { 910 return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded} 911} 912 913// Origin enumerates the values for origin. 914type Origin string 915 916const ( 917 // OriginInbound ... 918 OriginInbound Origin = "Inbound" 919 // OriginLocal ... 920 OriginLocal Origin = "Local" 921 // OriginOutbound ... 922 OriginOutbound Origin = "Outbound" 923) 924 925// PossibleOriginValues returns an array of possible values for the Origin const type. 926func PossibleOriginValues() []Origin { 927 return []Origin{OriginInbound, OriginLocal, OriginOutbound} 928} 929 930// PcError enumerates the values for pc error. 931type PcError string 932 933const ( 934 // AgentStopped ... 935 AgentStopped PcError = "AgentStopped" 936 // CaptureFailed ... 937 CaptureFailed PcError = "CaptureFailed" 938 // InternalError ... 939 InternalError PcError = "InternalError" 940 // LocalFileFailed ... 941 LocalFileFailed PcError = "LocalFileFailed" 942 // StorageFailed ... 943 StorageFailed PcError = "StorageFailed" 944) 945 946// PossiblePcErrorValues returns an array of possible values for the PcError const type. 947func PossiblePcErrorValues() []PcError { 948 return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed} 949} 950 951// PcProtocol enumerates the values for pc protocol. 952type PcProtocol string 953 954const ( 955 // PcProtocolAny ... 956 PcProtocolAny PcProtocol = "Any" 957 // PcProtocolTCP ... 958 PcProtocolTCP PcProtocol = "TCP" 959 // PcProtocolUDP ... 960 PcProtocolUDP PcProtocol = "UDP" 961) 962 963// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type. 964func PossiblePcProtocolValues() []PcProtocol { 965 return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP} 966} 967 968// PcStatus enumerates the values for pc status. 969type PcStatus string 970 971const ( 972 // PcStatusError ... 973 PcStatusError PcStatus = "Error" 974 // PcStatusNotStarted ... 975 PcStatusNotStarted PcStatus = "NotStarted" 976 // PcStatusRunning ... 977 PcStatusRunning PcStatus = "Running" 978 // PcStatusStopped ... 979 PcStatusStopped PcStatus = "Stopped" 980 // PcStatusUnknown ... 981 PcStatusUnknown PcStatus = "Unknown" 982) 983 984// PossiblePcStatusValues returns an array of possible values for the PcStatus const type. 985func PossiblePcStatusValues() []PcStatus { 986 return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown} 987} 988 989// PfsGroup enumerates the values for pfs group. 990type PfsGroup string 991 992const ( 993 // PfsGroupECP256 ... 994 PfsGroupECP256 PfsGroup = "ECP256" 995 // PfsGroupECP384 ... 996 PfsGroupECP384 PfsGroup = "ECP384" 997 // PfsGroupNone ... 998 PfsGroupNone PfsGroup = "None" 999 // PfsGroupPFS1 ... 1000 PfsGroupPFS1 PfsGroup = "PFS1" 1001 // PfsGroupPFS14 ... 1002 PfsGroupPFS14 PfsGroup = "PFS14" 1003 // PfsGroupPFS2 ... 1004 PfsGroupPFS2 PfsGroup = "PFS2" 1005 // PfsGroupPFS2048 ... 1006 PfsGroupPFS2048 PfsGroup = "PFS2048" 1007 // PfsGroupPFS24 ... 1008 PfsGroupPFS24 PfsGroup = "PFS24" 1009 // PfsGroupPFSMM ... 1010 PfsGroupPFSMM PfsGroup = "PFSMM" 1011) 1012 1013// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type. 1014func PossiblePfsGroupValues() []PfsGroup { 1015 return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM} 1016} 1017 1018// ProbeProtocol enumerates the values for probe protocol. 1019type ProbeProtocol string 1020 1021const ( 1022 // ProbeProtocolHTTP ... 1023 ProbeProtocolHTTP ProbeProtocol = "Http" 1024 // ProbeProtocolTCP ... 1025 ProbeProtocolTCP ProbeProtocol = "Tcp" 1026) 1027 1028// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type. 1029func PossibleProbeProtocolValues() []ProbeProtocol { 1030 return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolTCP} 1031} 1032 1033// ProcessorArchitecture enumerates the values for processor architecture. 1034type ProcessorArchitecture string 1035 1036const ( 1037 // Amd64 ... 1038 Amd64 ProcessorArchitecture = "Amd64" 1039 // X86 ... 1040 X86 ProcessorArchitecture = "X86" 1041) 1042 1043// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type. 1044func PossibleProcessorArchitectureValues() []ProcessorArchitecture { 1045 return []ProcessorArchitecture{Amd64, X86} 1046} 1047 1048// Protocol enumerates the values for protocol. 1049type Protocol string 1050 1051const ( 1052 // ProtocolHTTP ... 1053 ProtocolHTTP Protocol = "Http" 1054 // ProtocolHTTPS ... 1055 ProtocolHTTPS Protocol = "Https" 1056 // ProtocolIcmp ... 1057 ProtocolIcmp Protocol = "Icmp" 1058 // ProtocolTCP ... 1059 ProtocolTCP Protocol = "Tcp" 1060) 1061 1062// PossibleProtocolValues returns an array of possible values for the Protocol const type. 1063func PossibleProtocolValues() []Protocol { 1064 return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP} 1065} 1066 1067// ProvisioningState enumerates the values for provisioning state. 1068type ProvisioningState string 1069 1070const ( 1071 // Deleting ... 1072 Deleting ProvisioningState = "Deleting" 1073 // Failed ... 1074 Failed ProvisioningState = "Failed" 1075 // Succeeded ... 1076 Succeeded ProvisioningState = "Succeeded" 1077 // Updating ... 1078 Updating ProvisioningState = "Updating" 1079) 1080 1081// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. 1082func PossibleProvisioningStateValues() []ProvisioningState { 1083 return []ProvisioningState{Deleting, Failed, Succeeded, Updating} 1084} 1085 1086// PublicIPAddressSkuName enumerates the values for public ip address sku name. 1087type PublicIPAddressSkuName string 1088 1089const ( 1090 // PublicIPAddressSkuNameBasic ... 1091 PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" 1092 // PublicIPAddressSkuNameStandard ... 1093 PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" 1094) 1095 1096// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type. 1097func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { 1098 return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard} 1099} 1100 1101// RouteNextHopType enumerates the values for route next hop type. 1102type RouteNextHopType string 1103 1104const ( 1105 // RouteNextHopTypeInternet ... 1106 RouteNextHopTypeInternet RouteNextHopType = "Internet" 1107 // RouteNextHopTypeNone ... 1108 RouteNextHopTypeNone RouteNextHopType = "None" 1109 // RouteNextHopTypeVirtualAppliance ... 1110 RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" 1111 // RouteNextHopTypeVirtualNetworkGateway ... 1112 RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" 1113 // RouteNextHopTypeVnetLocal ... 1114 RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" 1115) 1116 1117// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type. 1118func PossibleRouteNextHopTypeValues() []RouteNextHopType { 1119 return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal} 1120} 1121 1122// SecurityRuleAccess enumerates the values for security rule access. 1123type SecurityRuleAccess string 1124 1125const ( 1126 // SecurityRuleAccessAllow ... 1127 SecurityRuleAccessAllow SecurityRuleAccess = "Allow" 1128 // SecurityRuleAccessDeny ... 1129 SecurityRuleAccessDeny SecurityRuleAccess = "Deny" 1130) 1131 1132// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type. 1133func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { 1134 return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny} 1135} 1136 1137// SecurityRuleDirection enumerates the values for security rule direction. 1138type SecurityRuleDirection string 1139 1140const ( 1141 // SecurityRuleDirectionInbound ... 1142 SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" 1143 // SecurityRuleDirectionOutbound ... 1144 SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" 1145) 1146 1147// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type. 1148func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { 1149 return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound} 1150} 1151 1152// SecurityRuleProtocol enumerates the values for security rule protocol. 1153type SecurityRuleProtocol string 1154 1155const ( 1156 // SecurityRuleProtocolAsterisk ... 1157 SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" 1158 // SecurityRuleProtocolTCP ... 1159 SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" 1160 // SecurityRuleProtocolUDP ... 1161 SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" 1162) 1163 1164// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. 1165func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { 1166 return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} 1167} 1168 1169// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. 1170type ServiceProviderProvisioningState string 1171 1172const ( 1173 // Deprovisioning ... 1174 Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" 1175 // NotProvisioned ... 1176 NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" 1177 // Provisioned ... 1178 Provisioned ServiceProviderProvisioningState = "Provisioned" 1179 // Provisioning ... 1180 Provisioning ServiceProviderProvisioningState = "Provisioning" 1181) 1182 1183// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type. 1184func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { 1185 return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning} 1186} 1187 1188// Severity enumerates the values for severity. 1189type Severity string 1190 1191const ( 1192 // SeverityError ... 1193 SeverityError Severity = "Error" 1194 // SeverityWarning ... 1195 SeverityWarning Severity = "Warning" 1196) 1197 1198// PossibleSeverityValues returns an array of possible values for the Severity const type. 1199func PossibleSeverityValues() []Severity { 1200 return []Severity{SeverityError, SeverityWarning} 1201} 1202 1203// TransportProtocol enumerates the values for transport protocol. 1204type TransportProtocol string 1205 1206const ( 1207 // TransportProtocolAll ... 1208 TransportProtocolAll TransportProtocol = "All" 1209 // TransportProtocolTCP ... 1210 TransportProtocolTCP TransportProtocol = "Tcp" 1211 // TransportProtocolUDP ... 1212 TransportProtocolUDP TransportProtocol = "Udp" 1213) 1214 1215// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type. 1216func PossibleTransportProtocolValues() []TransportProtocol { 1217 return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP} 1218} 1219 1220// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. 1221type VirtualNetworkGatewayConnectionStatus string 1222 1223const ( 1224 // VirtualNetworkGatewayConnectionStatusConnected ... 1225 VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" 1226 // VirtualNetworkGatewayConnectionStatusConnecting ... 1227 VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" 1228 // VirtualNetworkGatewayConnectionStatusNotConnected ... 1229 VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" 1230 // VirtualNetworkGatewayConnectionStatusUnknown ... 1231 VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" 1232) 1233 1234// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type. 1235func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { 1236 return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown} 1237} 1238 1239// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. 1240type VirtualNetworkGatewayConnectionType string 1241 1242const ( 1243 // ExpressRoute ... 1244 ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" 1245 // IPsec ... 1246 IPsec VirtualNetworkGatewayConnectionType = "IPsec" 1247 // Vnet2Vnet ... 1248 Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" 1249 // VPNClient ... 1250 VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" 1251) 1252 1253// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type. 1254func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { 1255 return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient} 1256} 1257 1258// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. 1259type VirtualNetworkGatewaySkuName string 1260 1261const ( 1262 // VirtualNetworkGatewaySkuNameBasic ... 1263 VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" 1264 // VirtualNetworkGatewaySkuNameHighPerformance ... 1265 VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" 1266 // VirtualNetworkGatewaySkuNameStandard ... 1267 VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" 1268 // VirtualNetworkGatewaySkuNameUltraPerformance ... 1269 VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" 1270 // VirtualNetworkGatewaySkuNameVpnGw1 ... 1271 VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" 1272 // VirtualNetworkGatewaySkuNameVpnGw2 ... 1273 VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" 1274 // VirtualNetworkGatewaySkuNameVpnGw3 ... 1275 VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" 1276) 1277 1278// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type. 1279func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName { 1280 return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw3} 1281} 1282 1283// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. 1284type VirtualNetworkGatewaySkuTier string 1285 1286const ( 1287 // VirtualNetworkGatewaySkuTierBasic ... 1288 VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" 1289 // VirtualNetworkGatewaySkuTierHighPerformance ... 1290 VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" 1291 // VirtualNetworkGatewaySkuTierStandard ... 1292 VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" 1293 // VirtualNetworkGatewaySkuTierUltraPerformance ... 1294 VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" 1295 // VirtualNetworkGatewaySkuTierVpnGw1 ... 1296 VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" 1297 // VirtualNetworkGatewaySkuTierVpnGw2 ... 1298 VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" 1299 // VirtualNetworkGatewaySkuTierVpnGw3 ... 1300 VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" 1301) 1302 1303// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type. 1304func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier { 1305 return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw3} 1306} 1307 1308// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. 1309type VirtualNetworkGatewayType string 1310 1311const ( 1312 // VirtualNetworkGatewayTypeExpressRoute ... 1313 VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" 1314 // VirtualNetworkGatewayTypeVpn ... 1315 VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" 1316) 1317 1318// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type. 1319func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { 1320 return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn} 1321} 1322 1323// VirtualNetworkPeeringState enumerates the values for virtual network peering state. 1324type VirtualNetworkPeeringState string 1325 1326const ( 1327 // VirtualNetworkPeeringStateConnected ... 1328 VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" 1329 // VirtualNetworkPeeringStateDisconnected ... 1330 VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" 1331 // VirtualNetworkPeeringStateInitiated ... 1332 VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" 1333) 1334 1335// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type. 1336func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { 1337 return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated} 1338} 1339 1340// VpnClientProtocol enumerates the values for vpn client protocol. 1341type VpnClientProtocol string 1342 1343const ( 1344 // IkeV2 ... 1345 IkeV2 VpnClientProtocol = "IkeV2" 1346 // SSTP ... 1347 SSTP VpnClientProtocol = "SSTP" 1348) 1349 1350// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type. 1351func PossibleVpnClientProtocolValues() []VpnClientProtocol { 1352 return []VpnClientProtocol{IkeV2, SSTP} 1353} 1354 1355// VpnType enumerates the values for vpn type. 1356type VpnType string 1357 1358const ( 1359 // PolicyBased ... 1360 PolicyBased VpnType = "PolicyBased" 1361 // RouteBased ... 1362 RouteBased VpnType = "RouteBased" 1363) 1364 1365// PossibleVpnTypeValues returns an array of possible values for the VpnType const type. 1366func PossibleVpnTypeValues() []VpnType { 1367 return []VpnType{PolicyBased, RouteBased} 1368} 1369 1370// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual 1371// network. 1372type AddressSpace struct { 1373 // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation. 1374 AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` 1375} 1376 1377// ApplicationGateway application gateway resource 1378type ApplicationGateway struct { 1379 autorest.Response `json:"-"` 1380 *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` 1381 // Etag - A unique read-only string that changes whenever the resource is updated. 1382 Etag *string `json:"etag,omitempty"` 1383 // ID - Resource ID. 1384 ID *string `json:"id,omitempty"` 1385 // Name - Resource name. 1386 Name *string `json:"name,omitempty"` 1387 // Type - Resource type. 1388 Type *string `json:"type,omitempty"` 1389 // Location - Resource location. 1390 Location *string `json:"location,omitempty"` 1391 // Tags - Resource tags. 1392 Tags map[string]*string `json:"tags"` 1393} 1394 1395// MarshalJSON is the custom marshaler for ApplicationGateway. 1396func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { 1397 objectMap := make(map[string]interface{}) 1398 if ag.ApplicationGatewayPropertiesFormat != nil { 1399 objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat 1400 } 1401 if ag.Etag != nil { 1402 objectMap["etag"] = ag.Etag 1403 } 1404 if ag.ID != nil { 1405 objectMap["id"] = ag.ID 1406 } 1407 if ag.Name != nil { 1408 objectMap["name"] = ag.Name 1409 } 1410 if ag.Type != nil { 1411 objectMap["type"] = ag.Type 1412 } 1413 if ag.Location != nil { 1414 objectMap["location"] = ag.Location 1415 } 1416 if ag.Tags != nil { 1417 objectMap["tags"] = ag.Tags 1418 } 1419 return json.Marshal(objectMap) 1420} 1421 1422// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct. 1423func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { 1424 var m map[string]*json.RawMessage 1425 err := json.Unmarshal(body, &m) 1426 if err != nil { 1427 return err 1428 } 1429 for k, v := range m { 1430 switch k { 1431 case "properties": 1432 if v != nil { 1433 var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat 1434 err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat) 1435 if err != nil { 1436 return err 1437 } 1438 ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat 1439 } 1440 case "etag": 1441 if v != nil { 1442 var etag string 1443 err = json.Unmarshal(*v, &etag) 1444 if err != nil { 1445 return err 1446 } 1447 ag.Etag = &etag 1448 } 1449 case "id": 1450 if v != nil { 1451 var ID string 1452 err = json.Unmarshal(*v, &ID) 1453 if err != nil { 1454 return err 1455 } 1456 ag.ID = &ID 1457 } 1458 case "name": 1459 if v != nil { 1460 var name string 1461 err = json.Unmarshal(*v, &name) 1462 if err != nil { 1463 return err 1464 } 1465 ag.Name = &name 1466 } 1467 case "type": 1468 if v != nil { 1469 var typeVar string 1470 err = json.Unmarshal(*v, &typeVar) 1471 if err != nil { 1472 return err 1473 } 1474 ag.Type = &typeVar 1475 } 1476 case "location": 1477 if v != nil { 1478 var location string 1479 err = json.Unmarshal(*v, &location) 1480 if err != nil { 1481 return err 1482 } 1483 ag.Location = &location 1484 } 1485 case "tags": 1486 if v != nil { 1487 var tags map[string]*string 1488 err = json.Unmarshal(*v, &tags) 1489 if err != nil { 1490 return err 1491 } 1492 ag.Tags = tags 1493 } 1494 } 1495 } 1496 1497 return nil 1498} 1499 1500// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway. 1501type ApplicationGatewayAuthenticationCertificate struct { 1502 *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` 1503 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 1504 Name *string `json:"name,omitempty"` 1505 // Etag - A unique read-only string that changes whenever the resource is updated. 1506 Etag *string `json:"etag,omitempty"` 1507 // Type - Type of the resource. 1508 Type *string `json:"type,omitempty"` 1509 // ID - Resource ID. 1510 ID *string `json:"id,omitempty"` 1511} 1512 1513// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate. 1514func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { 1515 objectMap := make(map[string]interface{}) 1516 if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil { 1517 objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat 1518 } 1519 if agac.Name != nil { 1520 objectMap["name"] = agac.Name 1521 } 1522 if agac.Etag != nil { 1523 objectMap["etag"] = agac.Etag 1524 } 1525 if agac.Type != nil { 1526 objectMap["type"] = agac.Type 1527 } 1528 if agac.ID != nil { 1529 objectMap["id"] = agac.ID 1530 } 1531 return json.Marshal(objectMap) 1532} 1533 1534// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct. 1535func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error { 1536 var m map[string]*json.RawMessage 1537 err := json.Unmarshal(body, &m) 1538 if err != nil { 1539 return err 1540 } 1541 for k, v := range m { 1542 switch k { 1543 case "properties": 1544 if v != nil { 1545 var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat 1546 err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat) 1547 if err != nil { 1548 return err 1549 } 1550 agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat 1551 } 1552 case "name": 1553 if v != nil { 1554 var name string 1555 err = json.Unmarshal(*v, &name) 1556 if err != nil { 1557 return err 1558 } 1559 agac.Name = &name 1560 } 1561 case "etag": 1562 if v != nil { 1563 var etag string 1564 err = json.Unmarshal(*v, &etag) 1565 if err != nil { 1566 return err 1567 } 1568 agac.Etag = &etag 1569 } 1570 case "type": 1571 if v != nil { 1572 var typeVar string 1573 err = json.Unmarshal(*v, &typeVar) 1574 if err != nil { 1575 return err 1576 } 1577 agac.Type = &typeVar 1578 } 1579 case "id": 1580 if v != nil { 1581 var ID string 1582 err = json.Unmarshal(*v, &ID) 1583 if err != nil { 1584 return err 1585 } 1586 agac.ID = &ID 1587 } 1588 } 1589 } 1590 1591 return nil 1592} 1593 1594// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an 1595// application gateway. 1596type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { 1597 // Data - Certificate public data. 1598 Data *string `json:"data,omitempty"` 1599 // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 1600 ProvisioningState *string `json:"provisioningState,omitempty"` 1601} 1602 1603// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service call. 1604type ApplicationGatewayAvailableSslOptions struct { 1605 autorest.Response `json:"-"` 1606 *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` 1607 // ID - Resource ID. 1608 ID *string `json:"id,omitempty"` 1609 // Name - Resource name. 1610 Name *string `json:"name,omitempty"` 1611 // Type - Resource type. 1612 Type *string `json:"type,omitempty"` 1613 // Location - Resource location. 1614 Location *string `json:"location,omitempty"` 1615 // Tags - Resource tags. 1616 Tags map[string]*string `json:"tags"` 1617} 1618 1619// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions. 1620func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) { 1621 objectMap := make(map[string]interface{}) 1622 if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil { 1623 objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat 1624 } 1625 if agaso.ID != nil { 1626 objectMap["id"] = agaso.ID 1627 } 1628 if agaso.Name != nil { 1629 objectMap["name"] = agaso.Name 1630 } 1631 if agaso.Type != nil { 1632 objectMap["type"] = agaso.Type 1633 } 1634 if agaso.Location != nil { 1635 objectMap["location"] = agaso.Location 1636 } 1637 if agaso.Tags != nil { 1638 objectMap["tags"] = agaso.Tags 1639 } 1640 return json.Marshal(objectMap) 1641} 1642 1643// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct. 1644func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error { 1645 var m map[string]*json.RawMessage 1646 err := json.Unmarshal(body, &m) 1647 if err != nil { 1648 return err 1649 } 1650 for k, v := range m { 1651 switch k { 1652 case "properties": 1653 if v != nil { 1654 var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat 1655 err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat) 1656 if err != nil { 1657 return err 1658 } 1659 agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat 1660 } 1661 case "id": 1662 if v != nil { 1663 var ID string 1664 err = json.Unmarshal(*v, &ID) 1665 if err != nil { 1666 return err 1667 } 1668 agaso.ID = &ID 1669 } 1670 case "name": 1671 if v != nil { 1672 var name string 1673 err = json.Unmarshal(*v, &name) 1674 if err != nil { 1675 return err 1676 } 1677 agaso.Name = &name 1678 } 1679 case "type": 1680 if v != nil { 1681 var typeVar string 1682 err = json.Unmarshal(*v, &typeVar) 1683 if err != nil { 1684 return err 1685 } 1686 agaso.Type = &typeVar 1687 } 1688 case "location": 1689 if v != nil { 1690 var location string 1691 err = json.Unmarshal(*v, &location) 1692 if err != nil { 1693 return err 1694 } 1695 agaso.Location = &location 1696 } 1697 case "tags": 1698 if v != nil { 1699 var tags map[string]*string 1700 err = json.Unmarshal(*v, &tags) 1701 if err != nil { 1702 return err 1703 } 1704 agaso.Tags = tags 1705 } 1706 } 1707 } 1708 1709 return nil 1710} 1711 1712// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of ApplicationGatewayAvailableSslOptions 1713type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { 1714 // PredefinedPolicies - List of available Ssl predefined policy. 1715 PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` 1716 // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' 1717 DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` 1718 // AvailableCipherSuites - List of available Ssl cipher suites. 1719 AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` 1720 // AvailableProtocols - List of available Ssl protocols. 1721 AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` 1722} 1723 1724// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API service 1725// call. 1726type ApplicationGatewayAvailableSslPredefinedPolicies struct { 1727 autorest.Response `json:"-"` 1728 // Value - List of available Ssl predefined policy. 1729 Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"` 1730 // NextLink - URL to get the next set of results. 1731 NextLink *string `json:"nextLink,omitempty"` 1732} 1733 1734// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of 1735// ApplicationGatewaySslPredefinedPolicy values. 1736type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct { 1737 i int 1738 page ApplicationGatewayAvailableSslPredefinedPoliciesPage 1739} 1740 1741// Next advances to the next value. If there was an error making 1742// the request the iterator does not advance and the error is returned. 1743func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error { 1744 iter.i++ 1745 if iter.i < len(iter.page.Values()) { 1746 return nil 1747 } 1748 err := iter.page.Next() 1749 if err != nil { 1750 iter.i-- 1751 return err 1752 } 1753 iter.i = 0 1754 return nil 1755} 1756 1757// NotDone returns true if the enumeration should be started or is not yet complete. 1758func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool { 1759 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1760} 1761 1762// Response returns the raw server response from the last page request. 1763func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies { 1764 return iter.page.Response() 1765} 1766 1767// Value returns the current value or a zero-initialized value if the 1768// iterator has advanced beyond the end of the collection. 1769func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy { 1770 if !iter.page.NotDone() { 1771 return ApplicationGatewaySslPredefinedPolicy{} 1772 } 1773 return iter.page.Values()[iter.i] 1774} 1775 1776// IsEmpty returns true if the ListResult contains no values. 1777func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool { 1778 return agaspp.Value == nil || len(*agaspp.Value) == 0 1779} 1780 1781// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results. 1782// It returns nil if no more results exist. 1783func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer() (*http.Request, error) { 1784 if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 { 1785 return nil, nil 1786 } 1787 return autorest.Prepare(&http.Request{}, 1788 autorest.AsJSON(), 1789 autorest.AsGet(), 1790 autorest.WithBaseURL(to.String(agaspp.NextLink))) 1791} 1792 1793// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of ApplicationGatewaySslPredefinedPolicy 1794// values. 1795type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct { 1796 fn func(ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error) 1797 agaspp ApplicationGatewayAvailableSslPredefinedPolicies 1798} 1799 1800// Next advances to the next page of values. If there was an error making 1801// the request the page does not advance and the error is returned. 1802func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error { 1803 next, err := page.fn(page.agaspp) 1804 if err != nil { 1805 return err 1806 } 1807 page.agaspp = next 1808 return nil 1809} 1810 1811// NotDone returns true if the page enumeration should be started or is not yet complete. 1812func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool { 1813 return !page.agaspp.IsEmpty() 1814} 1815 1816// Response returns the raw server response from the last page request. 1817func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies { 1818 return page.agaspp 1819} 1820 1821// Values returns the slice of values for the current page or nil if there are no values. 1822func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy { 1823 if page.agaspp.IsEmpty() { 1824 return nil 1825 } 1826 return *page.agaspp.Value 1827} 1828 1829// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API service 1830// call. 1831type ApplicationGatewayAvailableWafRuleSetsResult struct { 1832 autorest.Response `json:"-"` 1833 // Value - The list of application gateway rule sets. 1834 Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` 1835} 1836 1837// ApplicationGatewayBackendAddress backend address of an application gateway. 1838type ApplicationGatewayBackendAddress struct { 1839 // Fqdn - Fully qualified domain name (FQDN). 1840 Fqdn *string `json:"fqdn,omitempty"` 1841 // IPAddress - IP address 1842 IPAddress *string `json:"ipAddress,omitempty"` 1843} 1844 1845// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway. 1846type ApplicationGatewayBackendAddressPool struct { 1847 *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 1848 // Name - Resource that is unique within a resource group. This name can be used to access the resource. 1849 Name *string `json:"name,omitempty"` 1850 // Etag - A unique read-only string that changes whenever the resource is updated. 1851 Etag *string `json:"etag,omitempty"` 1852 // Type - Type of the resource. 1853 Type *string `json:"type,omitempty"` 1854 // ID - Resource ID. 1855 ID *string `json:"id,omitempty"` 1856} 1857 1858// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool. 1859func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { 1860 objectMap := make(map[string]interface{}) 1861 if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil { 1862 objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat 1863 } 1864 if agbap.Name != nil { 1865 objectMap["name"] = agbap.Name 1866 } 1867 if agbap.Etag != nil { 1868 objectMap["etag"] = agbap.Etag 1869 } 1870 if agbap.Type != nil { 1871 objectMap["type"] = agbap.Type 1872 } 1873 if agbap.ID != nil { 1874 objectMap["id"] = agbap.ID 1875 } 1876 return json.Marshal(objectMap) 1877} 1878 1879// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct. 1880func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error { 1881 var m map[string]*json.RawMessage 1882 err := json.Unmarshal(body, &m) 1883 if err != nil { 1884 return err 1885 } 1886 for k, v := range m { 1887 switch k { 1888 case "properties": 1889 if v != nil { 1890 var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat 1891 err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat) 1892 if err != nil { 1893 return err 1894 } 1895 agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat 1896 } 1897 case "name": 1898 if v != nil { 1899 var name string 1900 err = json.Unmarshal(*v, &name) 1901 if err != nil { 1902 return err 1903 } 1904 agbap.Name = &name 1905 } 1906 case "etag": 1907 if v != nil { 1908 var etag string 1909 err = json.Unmarshal(*v, &etag) 1910 if err != nil { 1911 return err 1912 } 1913 agbap.Etag = &etag 1914 } 1915 case "type": 1916 if v != nil { 1917 var typeVar string 1918 err = json.Unmarshal(*v, &typeVar) 1919 if err != nil { 1920 return err 1921 } 1922 agbap.Type = &typeVar 1923 } 1924 case "id": 1925 if v != nil { 1926 var ID string 1927 err = json.Unmarshal(*v, &ID) 1928 if err != nil { 1929 return err 1930 } 1931 agbap.ID = &ID 1932 } 1933 } 1934 } 1935 1936 return nil 1937} 1938 1939// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application 1940// gateway. 1941type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { 1942 // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. 1943 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 1944 // BackendAddresses - Backend addresses 1945 BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` 1946 // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 1947 ProvisioningState *string `json:"provisioningState,omitempty"` 1948} 1949 1950// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources. 1951type ApplicationGatewayBackendHealth struct { 1952 autorest.Response `json:"-"` 1953 BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` 1954} 1955 1956// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings. 1957type ApplicationGatewayBackendHealthHTTPSettings struct { 1958 // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource. 1959 BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` 1960 // Servers - List of ApplicationGatewayBackendHealthServer resources. 1961 Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` 1962} 1963 1964// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool. 1965type ApplicationGatewayBackendHealthPool struct { 1966 // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. 1967 BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` 1968 // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources. 1969 BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` 1970} 1971 1972// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings. 1973type ApplicationGatewayBackendHealthServer struct { 1974 // Address - IP address or FQDN of backend server. 1975 Address *string `json:"address,omitempty"` 1976 // IPConfiguration - Reference of IP configuration of backend server. 1977 IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` 1978 // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining' 1979 Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` 1980} 1981 1982// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway. 1983type ApplicationGatewayBackendHTTPSettings struct { 1984 *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` 1985 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 1986 Name *string `json:"name,omitempty"` 1987 // Etag - A unique read-only string that changes whenever the resource is updated. 1988 Etag *string `json:"etag,omitempty"` 1989 // Type - Type of the resource. 1990 Type *string `json:"type,omitempty"` 1991 // ID - Resource ID. 1992 ID *string `json:"id,omitempty"` 1993} 1994 1995// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings. 1996func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { 1997 objectMap := make(map[string]interface{}) 1998 if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil { 1999 objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat 2000 } 2001 if agbhs.Name != nil { 2002 objectMap["name"] = agbhs.Name 2003 } 2004 if agbhs.Etag != nil { 2005 objectMap["etag"] = agbhs.Etag 2006 } 2007 if agbhs.Type != nil { 2008 objectMap["type"] = agbhs.Type 2009 } 2010 if agbhs.ID != nil { 2011 objectMap["id"] = agbhs.ID 2012 } 2013 return json.Marshal(objectMap) 2014} 2015 2016// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct. 2017func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error { 2018 var m map[string]*json.RawMessage 2019 err := json.Unmarshal(body, &m) 2020 if err != nil { 2021 return err 2022 } 2023 for k, v := range m { 2024 switch k { 2025 case "properties": 2026 if v != nil { 2027 var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat 2028 err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat) 2029 if err != nil { 2030 return err 2031 } 2032 agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat 2033 } 2034 case "name": 2035 if v != nil { 2036 var name string 2037 err = json.Unmarshal(*v, &name) 2038 if err != nil { 2039 return err 2040 } 2041 agbhs.Name = &name 2042 } 2043 case "etag": 2044 if v != nil { 2045 var etag string 2046 err = json.Unmarshal(*v, &etag) 2047 if err != nil { 2048 return err 2049 } 2050 agbhs.Etag = &etag 2051 } 2052 case "type": 2053 if v != nil { 2054 var typeVar string 2055 err = json.Unmarshal(*v, &typeVar) 2056 if err != nil { 2057 return err 2058 } 2059 agbhs.Type = &typeVar 2060 } 2061 case "id": 2062 if v != nil { 2063 var ID string 2064 err = json.Unmarshal(*v, &ID) 2065 if err != nil { 2066 return err 2067 } 2068 agbhs.ID = &ID 2069 } 2070 } 2071 } 2072 2073 return nil 2074} 2075 2076// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an 2077// application gateway. 2078type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { 2079 // Port - Port 2080 Port *int32 `json:"port,omitempty"` 2081 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 2082 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 2083 // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled' 2084 CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` 2085 // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds. 2086 RequestTimeout *int32 `json:"requestTimeout,omitempty"` 2087 // Probe - Probe resource of an application gateway. 2088 Probe *SubResource `json:"probe,omitempty"` 2089 // AuthenticationCertificates - Array of references to application gateway authentication certificates. 2090 AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` 2091 // ConnectionDraining - Connection draining of the backend http settings resource. 2092 ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` 2093 // HostName - Host header to be sent to the backend servers. 2094 HostName *string `json:"hostName,omitempty"` 2095 // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false. 2096 PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` 2097 // AffinityCookieName - Cookie name to use for the affinity cookie. 2098 AffinityCookieName *string `json:"affinityCookieName,omitempty"` 2099 // ProbeEnabled - Whether the probe is enabled. Default value is false. 2100 ProbeEnabled *bool `json:"probeEnabled,omitempty"` 2101 // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. 2102 Path *string `json:"path,omitempty"` 2103 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2104 ProvisioningState *string `json:"provisioningState,omitempty"` 2105} 2106 2107// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to be 2108// active for a specified time after the backend server got removed from the configuration. 2109type ApplicationGatewayConnectionDraining struct { 2110 // Enabled - Whether connection draining is enabled or not. 2111 Enabled *bool `json:"enabled,omitempty"` 2112 // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. 2113 DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` 2114} 2115 2116// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire rule group. 2117type ApplicationGatewayFirewallDisabledRuleGroup struct { 2118 // RuleGroupName - The name of the rule group that will be disabled. 2119 RuleGroupName *string `json:"ruleGroupName,omitempty"` 2120 // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled. 2121 Rules *[]int32 `json:"rules,omitempty"` 2122} 2123 2124// ApplicationGatewayFirewallRule a web application firewall rule. 2125type ApplicationGatewayFirewallRule struct { 2126 // RuleID - The identifier of the web application firewall rule. 2127 RuleID *int32 `json:"ruleId,omitempty"` 2128 // Description - The description of the web application firewall rule. 2129 Description *string `json:"description,omitempty"` 2130} 2131 2132// ApplicationGatewayFirewallRuleGroup a web application firewall rule group. 2133type ApplicationGatewayFirewallRuleGroup struct { 2134 // RuleGroupName - The name of the web application firewall rule group. 2135 RuleGroupName *string `json:"ruleGroupName,omitempty"` 2136 // Description - The description of the web application firewall rule group. 2137 Description *string `json:"description,omitempty"` 2138 // Rules - The rules of the web application firewall rule group. 2139 Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"` 2140} 2141 2142// ApplicationGatewayFirewallRuleSet a web application firewall rule set. 2143type ApplicationGatewayFirewallRuleSet struct { 2144 *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` 2145 // ID - Resource ID. 2146 ID *string `json:"id,omitempty"` 2147 // Name - Resource name. 2148 Name *string `json:"name,omitempty"` 2149 // Type - Resource type. 2150 Type *string `json:"type,omitempty"` 2151 // Location - Resource location. 2152 Location *string `json:"location,omitempty"` 2153 // Tags - Resource tags. 2154 Tags map[string]*string `json:"tags"` 2155} 2156 2157// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet. 2158func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { 2159 objectMap := make(map[string]interface{}) 2160 if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil { 2161 objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat 2162 } 2163 if agfrs.ID != nil { 2164 objectMap["id"] = agfrs.ID 2165 } 2166 if agfrs.Name != nil { 2167 objectMap["name"] = agfrs.Name 2168 } 2169 if agfrs.Type != nil { 2170 objectMap["type"] = agfrs.Type 2171 } 2172 if agfrs.Location != nil { 2173 objectMap["location"] = agfrs.Location 2174 } 2175 if agfrs.Tags != nil { 2176 objectMap["tags"] = agfrs.Tags 2177 } 2178 return json.Marshal(objectMap) 2179} 2180 2181// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct. 2182func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error { 2183 var m map[string]*json.RawMessage 2184 err := json.Unmarshal(body, &m) 2185 if err != nil { 2186 return err 2187 } 2188 for k, v := range m { 2189 switch k { 2190 case "properties": 2191 if v != nil { 2192 var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat 2193 err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat) 2194 if err != nil { 2195 return err 2196 } 2197 agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat 2198 } 2199 case "id": 2200 if v != nil { 2201 var ID string 2202 err = json.Unmarshal(*v, &ID) 2203 if err != nil { 2204 return err 2205 } 2206 agfrs.ID = &ID 2207 } 2208 case "name": 2209 if v != nil { 2210 var name string 2211 err = json.Unmarshal(*v, &name) 2212 if err != nil { 2213 return err 2214 } 2215 agfrs.Name = &name 2216 } 2217 case "type": 2218 if v != nil { 2219 var typeVar string 2220 err = json.Unmarshal(*v, &typeVar) 2221 if err != nil { 2222 return err 2223 } 2224 agfrs.Type = &typeVar 2225 } 2226 case "location": 2227 if v != nil { 2228 var location string 2229 err = json.Unmarshal(*v, &location) 2230 if err != nil { 2231 return err 2232 } 2233 agfrs.Location = &location 2234 } 2235 case "tags": 2236 if v != nil { 2237 var tags map[string]*string 2238 err = json.Unmarshal(*v, &tags) 2239 if err != nil { 2240 return err 2241 } 2242 agfrs.Tags = tags 2243 } 2244 } 2245 } 2246 2247 return nil 2248} 2249 2250// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set. 2251type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { 2252 // ProvisioningState - The provisioning state of the web application firewall rule set. 2253 ProvisioningState *string `json:"provisioningState,omitempty"` 2254 // RuleSetType - The type of the web application firewall rule set. 2255 RuleSetType *string `json:"ruleSetType,omitempty"` 2256 // RuleSetVersion - The version of the web application firewall rule set type. 2257 RuleSetVersion *string `json:"ruleSetVersion,omitempty"` 2258 // RuleGroups - The rule groups of the web application firewall rule set. 2259 RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` 2260} 2261 2262// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. 2263type ApplicationGatewayFrontendIPConfiguration struct { 2264 *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 2265 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2266 Name *string `json:"name,omitempty"` 2267 // Etag - A unique read-only string that changes whenever the resource is updated. 2268 Etag *string `json:"etag,omitempty"` 2269 // Type - Type of the resource. 2270 Type *string `json:"type,omitempty"` 2271 // ID - Resource ID. 2272 ID *string `json:"id,omitempty"` 2273} 2274 2275// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration. 2276func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { 2277 objectMap := make(map[string]interface{}) 2278 if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil { 2279 objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat 2280 } 2281 if agfic.Name != nil { 2282 objectMap["name"] = agfic.Name 2283 } 2284 if agfic.Etag != nil { 2285 objectMap["etag"] = agfic.Etag 2286 } 2287 if agfic.Type != nil { 2288 objectMap["type"] = agfic.Type 2289 } 2290 if agfic.ID != nil { 2291 objectMap["id"] = agfic.ID 2292 } 2293 return json.Marshal(objectMap) 2294} 2295 2296// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct. 2297func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error { 2298 var m map[string]*json.RawMessage 2299 err := json.Unmarshal(body, &m) 2300 if err != nil { 2301 return err 2302 } 2303 for k, v := range m { 2304 switch k { 2305 case "properties": 2306 if v != nil { 2307 var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat 2308 err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat) 2309 if err != nil { 2310 return err 2311 } 2312 agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat 2313 } 2314 case "name": 2315 if v != nil { 2316 var name string 2317 err = json.Unmarshal(*v, &name) 2318 if err != nil { 2319 return err 2320 } 2321 agfic.Name = &name 2322 } 2323 case "etag": 2324 if v != nil { 2325 var etag string 2326 err = json.Unmarshal(*v, &etag) 2327 if err != nil { 2328 return err 2329 } 2330 agfic.Etag = &etag 2331 } 2332 case "type": 2333 if v != nil { 2334 var typeVar string 2335 err = json.Unmarshal(*v, &typeVar) 2336 if err != nil { 2337 return err 2338 } 2339 agfic.Type = &typeVar 2340 } 2341 case "id": 2342 if v != nil { 2343 var ID string 2344 err = json.Unmarshal(*v, &ID) 2345 if err != nil { 2346 return err 2347 } 2348 agfic.ID = &ID 2349 } 2350 } 2351 } 2352 2353 return nil 2354} 2355 2356// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an 2357// application gateway. 2358type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { 2359 // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration. 2360 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 2361 // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic' 2362 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 2363 // Subnet - Reference of the subnet resource. 2364 Subnet *SubResource `json:"subnet,omitempty"` 2365 // PublicIPAddress - Reference of the PublicIP resource. 2366 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 2367 // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2368 ProvisioningState *string `json:"provisioningState,omitempty"` 2369} 2370 2371// ApplicationGatewayFrontendPort frontend port of an application gateway. 2372type ApplicationGatewayFrontendPort struct { 2373 *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` 2374 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2375 Name *string `json:"name,omitempty"` 2376 // Etag - A unique read-only string that changes whenever the resource is updated. 2377 Etag *string `json:"etag,omitempty"` 2378 // Type - Type of the resource. 2379 Type *string `json:"type,omitempty"` 2380 // ID - Resource ID. 2381 ID *string `json:"id,omitempty"` 2382} 2383 2384// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort. 2385func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { 2386 objectMap := make(map[string]interface{}) 2387 if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil { 2388 objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat 2389 } 2390 if agfp.Name != nil { 2391 objectMap["name"] = agfp.Name 2392 } 2393 if agfp.Etag != nil { 2394 objectMap["etag"] = agfp.Etag 2395 } 2396 if agfp.Type != nil { 2397 objectMap["type"] = agfp.Type 2398 } 2399 if agfp.ID != nil { 2400 objectMap["id"] = agfp.ID 2401 } 2402 return json.Marshal(objectMap) 2403} 2404 2405// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct. 2406func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error { 2407 var m map[string]*json.RawMessage 2408 err := json.Unmarshal(body, &m) 2409 if err != nil { 2410 return err 2411 } 2412 for k, v := range m { 2413 switch k { 2414 case "properties": 2415 if v != nil { 2416 var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat 2417 err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat) 2418 if err != nil { 2419 return err 2420 } 2421 agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat 2422 } 2423 case "name": 2424 if v != nil { 2425 var name string 2426 err = json.Unmarshal(*v, &name) 2427 if err != nil { 2428 return err 2429 } 2430 agfp.Name = &name 2431 } 2432 case "etag": 2433 if v != nil { 2434 var etag string 2435 err = json.Unmarshal(*v, &etag) 2436 if err != nil { 2437 return err 2438 } 2439 agfp.Etag = &etag 2440 } 2441 case "type": 2442 if v != nil { 2443 var typeVar string 2444 err = json.Unmarshal(*v, &typeVar) 2445 if err != nil { 2446 return err 2447 } 2448 agfp.Type = &typeVar 2449 } 2450 case "id": 2451 if v != nil { 2452 var ID string 2453 err = json.Unmarshal(*v, &ID) 2454 if err != nil { 2455 return err 2456 } 2457 agfp.ID = &ID 2458 } 2459 } 2460 } 2461 2462 return nil 2463} 2464 2465// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway. 2466type ApplicationGatewayFrontendPortPropertiesFormat struct { 2467 // Port - Frontend port 2468 Port *int32 `json:"port,omitempty"` 2469 // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2470 ProvisioningState *string `json:"provisioningState,omitempty"` 2471} 2472 2473// ApplicationGatewayHTTPListener http listener of an application gateway. 2474type ApplicationGatewayHTTPListener struct { 2475 *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` 2476 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2477 Name *string `json:"name,omitempty"` 2478 // Etag - A unique read-only string that changes whenever the resource is updated. 2479 Etag *string `json:"etag,omitempty"` 2480 // Type - Type of the resource. 2481 Type *string `json:"type,omitempty"` 2482 // ID - Resource ID. 2483 ID *string `json:"id,omitempty"` 2484} 2485 2486// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener. 2487func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { 2488 objectMap := make(map[string]interface{}) 2489 if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil { 2490 objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat 2491 } 2492 if aghl.Name != nil { 2493 objectMap["name"] = aghl.Name 2494 } 2495 if aghl.Etag != nil { 2496 objectMap["etag"] = aghl.Etag 2497 } 2498 if aghl.Type != nil { 2499 objectMap["type"] = aghl.Type 2500 } 2501 if aghl.ID != nil { 2502 objectMap["id"] = aghl.ID 2503 } 2504 return json.Marshal(objectMap) 2505} 2506 2507// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct. 2508func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error { 2509 var m map[string]*json.RawMessage 2510 err := json.Unmarshal(body, &m) 2511 if err != nil { 2512 return err 2513 } 2514 for k, v := range m { 2515 switch k { 2516 case "properties": 2517 if v != nil { 2518 var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat 2519 err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat) 2520 if err != nil { 2521 return err 2522 } 2523 aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat 2524 } 2525 case "name": 2526 if v != nil { 2527 var name string 2528 err = json.Unmarshal(*v, &name) 2529 if err != nil { 2530 return err 2531 } 2532 aghl.Name = &name 2533 } 2534 case "etag": 2535 if v != nil { 2536 var etag string 2537 err = json.Unmarshal(*v, &etag) 2538 if err != nil { 2539 return err 2540 } 2541 aghl.Etag = &etag 2542 } 2543 case "type": 2544 if v != nil { 2545 var typeVar string 2546 err = json.Unmarshal(*v, &typeVar) 2547 if err != nil { 2548 return err 2549 } 2550 aghl.Type = &typeVar 2551 } 2552 case "id": 2553 if v != nil { 2554 var ID string 2555 err = json.Unmarshal(*v, &ID) 2556 if err != nil { 2557 return err 2558 } 2559 aghl.ID = &ID 2560 } 2561 } 2562 } 2563 2564 return nil 2565} 2566 2567// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway. 2568type ApplicationGatewayHTTPListenerPropertiesFormat struct { 2569 // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway. 2570 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 2571 // FrontendPort - Frontend port resource of an application gateway. 2572 FrontendPort *SubResource `json:"frontendPort,omitempty"` 2573 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 2574 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 2575 // HostName - Host name of HTTP listener. 2576 HostName *string `json:"hostName,omitempty"` 2577 // SslCertificate - SSL certificate resource of an application gateway. 2578 SslCertificate *SubResource `json:"sslCertificate,omitempty"` 2579 // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting. 2580 RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` 2581 // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2582 ProvisioningState *string `json:"provisioningState,omitempty"` 2583} 2584 2585// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 private 2586// IP configuration is allowed. 2587type ApplicationGatewayIPConfiguration struct { 2588 *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 2589 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2590 Name *string `json:"name,omitempty"` 2591 // Etag - A unique read-only string that changes whenever the resource is updated. 2592 Etag *string `json:"etag,omitempty"` 2593 // Type - Type of the resource. 2594 Type *string `json:"type,omitempty"` 2595 // ID - Resource ID. 2596 ID *string `json:"id,omitempty"` 2597} 2598 2599// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration. 2600func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 2601 objectMap := make(map[string]interface{}) 2602 if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil { 2603 objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat 2604 } 2605 if agic.Name != nil { 2606 objectMap["name"] = agic.Name 2607 } 2608 if agic.Etag != nil { 2609 objectMap["etag"] = agic.Etag 2610 } 2611 if agic.Type != nil { 2612 objectMap["type"] = agic.Type 2613 } 2614 if agic.ID != nil { 2615 objectMap["id"] = agic.ID 2616 } 2617 return json.Marshal(objectMap) 2618} 2619 2620// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct. 2621func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 2622 var m map[string]*json.RawMessage 2623 err := json.Unmarshal(body, &m) 2624 if err != nil { 2625 return err 2626 } 2627 for k, v := range m { 2628 switch k { 2629 case "properties": 2630 if v != nil { 2631 var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat 2632 err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat) 2633 if err != nil { 2634 return err 2635 } 2636 agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat 2637 } 2638 case "name": 2639 if v != nil { 2640 var name string 2641 err = json.Unmarshal(*v, &name) 2642 if err != nil { 2643 return err 2644 } 2645 agic.Name = &name 2646 } 2647 case "etag": 2648 if v != nil { 2649 var etag string 2650 err = json.Unmarshal(*v, &etag) 2651 if err != nil { 2652 return err 2653 } 2654 agic.Etag = &etag 2655 } 2656 case "type": 2657 if v != nil { 2658 var typeVar string 2659 err = json.Unmarshal(*v, &typeVar) 2660 if err != nil { 2661 return err 2662 } 2663 agic.Type = &typeVar 2664 } 2665 case "id": 2666 if v != nil { 2667 var ID string 2668 err = json.Unmarshal(*v, &ID) 2669 if err != nil { 2670 return err 2671 } 2672 agic.ID = &ID 2673 } 2674 } 2675 } 2676 2677 return nil 2678} 2679 2680// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway. 2681type ApplicationGatewayIPConfigurationPropertiesFormat struct { 2682 // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address. 2683 Subnet *SubResource `json:"subnet,omitempty"` 2684 // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2685 ProvisioningState *string `json:"provisioningState,omitempty"` 2686} 2687 2688// ApplicationGatewayListResult response for ListApplicationGateways API service call. 2689type ApplicationGatewayListResult struct { 2690 autorest.Response `json:"-"` 2691 // Value - List of an application gateways in a resource group. 2692 Value *[]ApplicationGateway `json:"value,omitempty"` 2693 // NextLink - URL to get the next set of results. 2694 NextLink *string `json:"nextLink,omitempty"` 2695} 2696 2697// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values. 2698type ApplicationGatewayListResultIterator struct { 2699 i int 2700 page ApplicationGatewayListResultPage 2701} 2702 2703// Next advances to the next value. If there was an error making 2704// the request the iterator does not advance and the error is returned. 2705func (iter *ApplicationGatewayListResultIterator) Next() error { 2706 iter.i++ 2707 if iter.i < len(iter.page.Values()) { 2708 return nil 2709 } 2710 err := iter.page.Next() 2711 if err != nil { 2712 iter.i-- 2713 return err 2714 } 2715 iter.i = 0 2716 return nil 2717} 2718 2719// NotDone returns true if the enumeration should be started or is not yet complete. 2720func (iter ApplicationGatewayListResultIterator) NotDone() bool { 2721 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2722} 2723 2724// Response returns the raw server response from the last page request. 2725func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult { 2726 return iter.page.Response() 2727} 2728 2729// Value returns the current value or a zero-initialized value if the 2730// iterator has advanced beyond the end of the collection. 2731func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway { 2732 if !iter.page.NotDone() { 2733 return ApplicationGateway{} 2734 } 2735 return iter.page.Values()[iter.i] 2736} 2737 2738// IsEmpty returns true if the ListResult contains no values. 2739func (aglr ApplicationGatewayListResult) IsEmpty() bool { 2740 return aglr.Value == nil || len(*aglr.Value) == 0 2741} 2742 2743// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results. 2744// It returns nil if no more results exist. 2745func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() (*http.Request, error) { 2746 if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 { 2747 return nil, nil 2748 } 2749 return autorest.Prepare(&http.Request{}, 2750 autorest.AsJSON(), 2751 autorest.AsGet(), 2752 autorest.WithBaseURL(to.String(aglr.NextLink))) 2753} 2754 2755// ApplicationGatewayListResultPage contains a page of ApplicationGateway values. 2756type ApplicationGatewayListResultPage struct { 2757 fn func(ApplicationGatewayListResult) (ApplicationGatewayListResult, error) 2758 aglr ApplicationGatewayListResult 2759} 2760 2761// Next advances to the next page of values. If there was an error making 2762// the request the page does not advance and the error is returned. 2763func (page *ApplicationGatewayListResultPage) Next() error { 2764 next, err := page.fn(page.aglr) 2765 if err != nil { 2766 return err 2767 } 2768 page.aglr = next 2769 return nil 2770} 2771 2772// NotDone returns true if the page enumeration should be started or is not yet complete. 2773func (page ApplicationGatewayListResultPage) NotDone() bool { 2774 return !page.aglr.IsEmpty() 2775} 2776 2777// Response returns the raw server response from the last page request. 2778func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult { 2779 return page.aglr 2780} 2781 2782// Values returns the slice of values for the current page or nil if there are no values. 2783func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway { 2784 if page.aglr.IsEmpty() { 2785 return nil 2786 } 2787 return *page.aglr.Value 2788} 2789 2790// ApplicationGatewayPathRule path rule of URL path map of an application gateway. 2791type ApplicationGatewayPathRule struct { 2792 *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` 2793 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2794 Name *string `json:"name,omitempty"` 2795 // Etag - A unique read-only string that changes whenever the resource is updated. 2796 Etag *string `json:"etag,omitempty"` 2797 // Type - Type of the resource. 2798 Type *string `json:"type,omitempty"` 2799 // ID - Resource ID. 2800 ID *string `json:"id,omitempty"` 2801} 2802 2803// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule. 2804func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { 2805 objectMap := make(map[string]interface{}) 2806 if agpr.ApplicationGatewayPathRulePropertiesFormat != nil { 2807 objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat 2808 } 2809 if agpr.Name != nil { 2810 objectMap["name"] = agpr.Name 2811 } 2812 if agpr.Etag != nil { 2813 objectMap["etag"] = agpr.Etag 2814 } 2815 if agpr.Type != nil { 2816 objectMap["type"] = agpr.Type 2817 } 2818 if agpr.ID != nil { 2819 objectMap["id"] = agpr.ID 2820 } 2821 return json.Marshal(objectMap) 2822} 2823 2824// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct. 2825func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error { 2826 var m map[string]*json.RawMessage 2827 err := json.Unmarshal(body, &m) 2828 if err != nil { 2829 return err 2830 } 2831 for k, v := range m { 2832 switch k { 2833 case "properties": 2834 if v != nil { 2835 var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat 2836 err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat) 2837 if err != nil { 2838 return err 2839 } 2840 agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat 2841 } 2842 case "name": 2843 if v != nil { 2844 var name string 2845 err = json.Unmarshal(*v, &name) 2846 if err != nil { 2847 return err 2848 } 2849 agpr.Name = &name 2850 } 2851 case "etag": 2852 if v != nil { 2853 var etag string 2854 err = json.Unmarshal(*v, &etag) 2855 if err != nil { 2856 return err 2857 } 2858 agpr.Etag = &etag 2859 } 2860 case "type": 2861 if v != nil { 2862 var typeVar string 2863 err = json.Unmarshal(*v, &typeVar) 2864 if err != nil { 2865 return err 2866 } 2867 agpr.Type = &typeVar 2868 } 2869 case "id": 2870 if v != nil { 2871 var ID string 2872 err = json.Unmarshal(*v, &ID) 2873 if err != nil { 2874 return err 2875 } 2876 agpr.ID = &ID 2877 } 2878 } 2879 } 2880 2881 return nil 2882} 2883 2884// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway. 2885type ApplicationGatewayPathRulePropertiesFormat struct { 2886 // Paths - Path rules of URL path map. 2887 Paths *[]string `json:"paths,omitempty"` 2888 // BackendAddressPool - Backend address pool resource of URL path map path rule. 2889 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 2890 // BackendHTTPSettings - Backend http settings resource of URL path map path rule. 2891 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 2892 // RedirectConfiguration - Redirect configuration resource of URL path map path rule. 2893 RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` 2894 // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 2895 ProvisioningState *string `json:"provisioningState,omitempty"` 2896} 2897 2898// ApplicationGatewayProbe probe of the application gateway. 2899type ApplicationGatewayProbe struct { 2900 *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` 2901 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 2902 Name *string `json:"name,omitempty"` 2903 // Etag - A unique read-only string that changes whenever the resource is updated. 2904 Etag *string `json:"etag,omitempty"` 2905 // Type - Type of the resource. 2906 Type *string `json:"type,omitempty"` 2907 // ID - Resource ID. 2908 ID *string `json:"id,omitempty"` 2909} 2910 2911// MarshalJSON is the custom marshaler for ApplicationGatewayProbe. 2912func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { 2913 objectMap := make(map[string]interface{}) 2914 if agp.ApplicationGatewayProbePropertiesFormat != nil { 2915 objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat 2916 } 2917 if agp.Name != nil { 2918 objectMap["name"] = agp.Name 2919 } 2920 if agp.Etag != nil { 2921 objectMap["etag"] = agp.Etag 2922 } 2923 if agp.Type != nil { 2924 objectMap["type"] = agp.Type 2925 } 2926 if agp.ID != nil { 2927 objectMap["id"] = agp.ID 2928 } 2929 return json.Marshal(objectMap) 2930} 2931 2932// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct. 2933func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error { 2934 var m map[string]*json.RawMessage 2935 err := json.Unmarshal(body, &m) 2936 if err != nil { 2937 return err 2938 } 2939 for k, v := range m { 2940 switch k { 2941 case "properties": 2942 if v != nil { 2943 var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat 2944 err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat) 2945 if err != nil { 2946 return err 2947 } 2948 agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat 2949 } 2950 case "name": 2951 if v != nil { 2952 var name string 2953 err = json.Unmarshal(*v, &name) 2954 if err != nil { 2955 return err 2956 } 2957 agp.Name = &name 2958 } 2959 case "etag": 2960 if v != nil { 2961 var etag string 2962 err = json.Unmarshal(*v, &etag) 2963 if err != nil { 2964 return err 2965 } 2966 agp.Etag = &etag 2967 } 2968 case "type": 2969 if v != nil { 2970 var typeVar string 2971 err = json.Unmarshal(*v, &typeVar) 2972 if err != nil { 2973 return err 2974 } 2975 agp.Type = &typeVar 2976 } 2977 case "id": 2978 if v != nil { 2979 var ID string 2980 err = json.Unmarshal(*v, &ID) 2981 if err != nil { 2982 return err 2983 } 2984 agp.ID = &ID 2985 } 2986 } 2987 } 2988 2989 return nil 2990} 2991 2992// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match 2993type ApplicationGatewayProbeHealthResponseMatch struct { 2994 // Body - Body that must be contained in the health response. Default value is empty. 2995 Body *string `json:"body,omitempty"` 2996 // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. 2997 StatusCodes *[]string `json:"statusCodes,omitempty"` 2998} 2999 3000// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. 3001type ApplicationGatewayProbePropertiesFormat struct { 3002 // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS' 3003 Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` 3004 // Host - Host name to send the probe to. 3005 Host *string `json:"host,omitempty"` 3006 // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path> 3007 Path *string `json:"path,omitempty"` 3008 // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. 3009 Interval *int32 `json:"interval,omitempty"` 3010 // Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. 3011 Timeout *int32 `json:"timeout,omitempty"` 3012 // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. 3013 UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` 3014 // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. 3015 PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` 3016 // MinServers - Minimum number of servers that are always marked healthy. Default value is 0. 3017 MinServers *int32 `json:"minServers,omitempty"` 3018 // Match - Criterion for classifying a healthy probe response. 3019 Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` 3020 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3021 ProvisioningState *string `json:"provisioningState,omitempty"` 3022} 3023 3024// ApplicationGatewayPropertiesFormat properties of the application gateway. 3025type ApplicationGatewayPropertiesFormat struct { 3026 // Sku - SKU of the application gateway resource. 3027 Sku *ApplicationGatewaySku `json:"sku,omitempty"` 3028 // SslPolicy - SSL policy of the application gateway resource. 3029 SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` 3030 // OperationalState - Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' 3031 OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` 3032 // GatewayIPConfigurations - Subnets of application the gateway resource. 3033 GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` 3034 // AuthenticationCertificates - Authentication certificates of the application gateway resource. 3035 AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` 3036 // SslCertificates - SSL certificates of the application gateway resource. 3037 SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` 3038 // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. 3039 FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 3040 // FrontendPorts - Frontend ports of the application gateway resource. 3041 FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` 3042 // Probes - Probes of the application gateway resource. 3043 Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` 3044 // BackendAddressPools - Backend address pool of the application gateway resource. 3045 BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` 3046 // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. 3047 BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` 3048 // HTTPListeners - Http listeners of the application gateway resource. 3049 HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` 3050 // URLPathMaps - URL path map of the application gateway resource. 3051 URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` 3052 // RequestRoutingRules - Request routing rules of the application gateway resource. 3053 RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` 3054 // RedirectConfigurations - Redirect configurations of the application gateway resource. 3055 RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` 3056 // WebApplicationFirewallConfiguration - Web application firewall configuration. 3057 WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` 3058 // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. 3059 EnableHTTP2 *bool `json:"enableHttp2,omitempty"` 3060 // ResourceGUID - Resource GUID property of the application gateway resource. 3061 ResourceGUID *string `json:"resourceGuid,omitempty"` 3062 // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3063 ProvisioningState *string `json:"provisioningState,omitempty"` 3064} 3065 3066// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. 3067type ApplicationGatewayRedirectConfiguration struct { 3068 *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` 3069 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3070 Name *string `json:"name,omitempty"` 3071 // Etag - A unique read-only string that changes whenever the resource is updated. 3072 Etag *string `json:"etag,omitempty"` 3073 // Type - Type of the resource. 3074 Type *string `json:"type,omitempty"` 3075 // ID - Resource ID. 3076 ID *string `json:"id,omitempty"` 3077} 3078 3079// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration. 3080func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { 3081 objectMap := make(map[string]interface{}) 3082 if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil { 3083 objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat 3084 } 3085 if agrc.Name != nil { 3086 objectMap["name"] = agrc.Name 3087 } 3088 if agrc.Etag != nil { 3089 objectMap["etag"] = agrc.Etag 3090 } 3091 if agrc.Type != nil { 3092 objectMap["type"] = agrc.Type 3093 } 3094 if agrc.ID != nil { 3095 objectMap["id"] = agrc.ID 3096 } 3097 return json.Marshal(objectMap) 3098} 3099 3100// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct. 3101func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error { 3102 var m map[string]*json.RawMessage 3103 err := json.Unmarshal(body, &m) 3104 if err != nil { 3105 return err 3106 } 3107 for k, v := range m { 3108 switch k { 3109 case "properties": 3110 if v != nil { 3111 var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat 3112 err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat) 3113 if err != nil { 3114 return err 3115 } 3116 agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat 3117 } 3118 case "name": 3119 if v != nil { 3120 var name string 3121 err = json.Unmarshal(*v, &name) 3122 if err != nil { 3123 return err 3124 } 3125 agrc.Name = &name 3126 } 3127 case "etag": 3128 if v != nil { 3129 var etag string 3130 err = json.Unmarshal(*v, &etag) 3131 if err != nil { 3132 return err 3133 } 3134 agrc.Etag = &etag 3135 } 3136 case "type": 3137 if v != nil { 3138 var typeVar string 3139 err = json.Unmarshal(*v, &typeVar) 3140 if err != nil { 3141 return err 3142 } 3143 agrc.Type = &typeVar 3144 } 3145 case "id": 3146 if v != nil { 3147 var ID string 3148 err = json.Unmarshal(*v, &ID) 3149 if err != nil { 3150 return err 3151 } 3152 agrc.ID = &ID 3153 } 3154 } 3155 } 3156 3157 return nil 3158} 3159 3160// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the application 3161// gateway. 3162type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { 3163 // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary' 3164 RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` 3165 // TargetListener - Reference to a listener to redirect the request to. 3166 TargetListener *SubResource `json:"targetListener,omitempty"` 3167 // TargetURL - Url to redirect the request to. 3168 TargetURL *string `json:"targetUrl,omitempty"` 3169 // IncludePath - Include path in the redirected url. 3170 IncludePath *bool `json:"includePath,omitempty"` 3171 // IncludeQueryString - Include query string in the redirected url. 3172 IncludeQueryString *bool `json:"includeQueryString,omitempty"` 3173 // RequestRoutingRules - Request routing specifying redirect configuration. 3174 RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` 3175 // URLPathMaps - Url path maps specifying default redirect configuration. 3176 URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` 3177 // PathRules - Path rules specifying redirect configuration. 3178 PathRules *[]SubResource `json:"pathRules,omitempty"` 3179} 3180 3181// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway. 3182type ApplicationGatewayRequestRoutingRule struct { 3183 *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` 3184 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3185 Name *string `json:"name,omitempty"` 3186 // Etag - A unique read-only string that changes whenever the resource is updated. 3187 Etag *string `json:"etag,omitempty"` 3188 // Type - Type of the resource. 3189 Type *string `json:"type,omitempty"` 3190 // ID - Resource ID. 3191 ID *string `json:"id,omitempty"` 3192} 3193 3194// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule. 3195func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { 3196 objectMap := make(map[string]interface{}) 3197 if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil { 3198 objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat 3199 } 3200 if agrrr.Name != nil { 3201 objectMap["name"] = agrrr.Name 3202 } 3203 if agrrr.Etag != nil { 3204 objectMap["etag"] = agrrr.Etag 3205 } 3206 if agrrr.Type != nil { 3207 objectMap["type"] = agrrr.Type 3208 } 3209 if agrrr.ID != nil { 3210 objectMap["id"] = agrrr.ID 3211 } 3212 return json.Marshal(objectMap) 3213} 3214 3215// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct. 3216func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error { 3217 var m map[string]*json.RawMessage 3218 err := json.Unmarshal(body, &m) 3219 if err != nil { 3220 return err 3221 } 3222 for k, v := range m { 3223 switch k { 3224 case "properties": 3225 if v != nil { 3226 var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat 3227 err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat) 3228 if err != nil { 3229 return err 3230 } 3231 agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat 3232 } 3233 case "name": 3234 if v != nil { 3235 var name string 3236 err = json.Unmarshal(*v, &name) 3237 if err != nil { 3238 return err 3239 } 3240 agrrr.Name = &name 3241 } 3242 case "etag": 3243 if v != nil { 3244 var etag string 3245 err = json.Unmarshal(*v, &etag) 3246 if err != nil { 3247 return err 3248 } 3249 agrrr.Etag = &etag 3250 } 3251 case "type": 3252 if v != nil { 3253 var typeVar string 3254 err = json.Unmarshal(*v, &typeVar) 3255 if err != nil { 3256 return err 3257 } 3258 agrrr.Type = &typeVar 3259 } 3260 case "id": 3261 if v != nil { 3262 var ID string 3263 err = json.Unmarshal(*v, &ID) 3264 if err != nil { 3265 return err 3266 } 3267 agrrr.ID = &ID 3268 } 3269 } 3270 } 3271 3272 return nil 3273} 3274 3275// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application 3276// gateway. 3277type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { 3278 // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting' 3279 RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` 3280 // BackendAddressPool - Backend address pool resource of the application gateway. 3281 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 3282 // BackendHTTPSettings - Frontend port resource of the application gateway. 3283 BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` 3284 // HTTPListener - Http listener resource of the application gateway. 3285 HTTPListener *SubResource `json:"httpListener,omitempty"` 3286 // URLPathMap - URL path map resource of the application gateway. 3287 URLPathMap *SubResource `json:"urlPathMap,omitempty"` 3288 // RedirectConfiguration - Redirect configuration resource of the application gateway. 3289 RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` 3290 // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3291 ProvisioningState *string `json:"provisioningState,omitempty"` 3292} 3293 3294// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a 3295// long-running operation. 3296type ApplicationGatewaysBackendHealthFuture struct { 3297 azure.Future 3298 req *http.Request 3299} 3300 3301// Result returns the result of the asynchronous operation. 3302// If the operation has not completed it will return an error. 3303func (future ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) { 3304 var done bool 3305 done, err = future.Done(client) 3306 if err != nil { 3307 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure") 3308 return 3309 } 3310 if !done { 3311 return agbh, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture") 3312 } 3313 if future.PollingMethod() == azure.PollingLocation { 3314 agbh, err = client.BackendHealthResponder(future.Response()) 3315 if err != nil { 3316 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Failure responding to request") 3317 } 3318 return 3319 } 3320 var req *http.Request 3321 var resp *http.Response 3322 if future.PollingURL() != "" { 3323 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3324 if err != nil { 3325 return 3326 } 3327 } else { 3328 req = autorest.ChangeToGet(future.req) 3329 } 3330 resp, err = autorest.SendWithSender(client, req, 3331 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3332 if err != nil { 3333 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure sending request") 3334 return 3335 } 3336 agbh, err = client.BackendHealthResponder(resp) 3337 if err != nil { 3338 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", resp, "Failure responding to request") 3339 } 3340 return 3341} 3342 3343// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 3344// long-running operation. 3345type ApplicationGatewaysCreateOrUpdateFuture struct { 3346 azure.Future 3347 req *http.Request 3348} 3349 3350// Result returns the result of the asynchronous operation. 3351// If the operation has not completed it will return an error. 3352func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { 3353 var done bool 3354 done, err = future.Done(client) 3355 if err != nil { 3356 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 3357 return 3358 } 3359 if !done { 3360 return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture") 3361 } 3362 if future.PollingMethod() == azure.PollingLocation { 3363 ag, err = client.CreateOrUpdateResponder(future.Response()) 3364 if err != nil { 3365 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 3366 } 3367 return 3368 } 3369 var req *http.Request 3370 var resp *http.Response 3371 if future.PollingURL() != "" { 3372 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3373 if err != nil { 3374 return 3375 } 3376 } else { 3377 req = autorest.ChangeToGet(future.req) 3378 } 3379 resp, err = autorest.SendWithSender(client, req, 3380 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3381 if err != nil { 3382 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") 3383 return 3384 } 3385 ag, err = client.CreateOrUpdateResponder(resp) 3386 if err != nil { 3387 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 3388 } 3389 return 3390} 3391 3392// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 3393// operation. 3394type ApplicationGatewaysDeleteFuture struct { 3395 azure.Future 3396 req *http.Request 3397} 3398 3399// Result returns the result of the asynchronous operation. 3400// If the operation has not completed it will return an error. 3401func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3402 var done bool 3403 done, err = future.Done(client) 3404 if err != nil { 3405 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 3406 return 3407 } 3408 if !done { 3409 return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture") 3410 } 3411 if future.PollingMethod() == azure.PollingLocation { 3412 ar, err = client.DeleteResponder(future.Response()) 3413 if err != nil { 3414 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") 3415 } 3416 return 3417 } 3418 var req *http.Request 3419 var resp *http.Response 3420 if future.PollingURL() != "" { 3421 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3422 if err != nil { 3423 return 3424 } 3425 } else { 3426 req = autorest.ChangeToGet(future.req) 3427 } 3428 resp, err = autorest.SendWithSender(client, req, 3429 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3430 if err != nil { 3431 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request") 3432 return 3433 } 3434 ar, err = client.DeleteResponder(resp) 3435 if err != nil { 3436 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request") 3437 } 3438 return 3439} 3440 3441// ApplicationGatewaySku SKU of an application gateway 3442type ApplicationGatewaySku struct { 3443 // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge' 3444 Name ApplicationGatewaySkuName `json:"name,omitempty"` 3445 // Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF' 3446 Tier ApplicationGatewayTier `json:"tier,omitempty"` 3447 // Capacity - Capacity (instance count) of an application gateway. 3448 Capacity *int32 `json:"capacity,omitempty"` 3449} 3450 3451// ApplicationGatewaySslCertificate SSL certificates of an application gateway. 3452type ApplicationGatewaySslCertificate struct { 3453 *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` 3454 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3455 Name *string `json:"name,omitempty"` 3456 // Etag - A unique read-only string that changes whenever the resource is updated. 3457 Etag *string `json:"etag,omitempty"` 3458 // Type - Type of the resource. 3459 Type *string `json:"type,omitempty"` 3460 // ID - Resource ID. 3461 ID *string `json:"id,omitempty"` 3462} 3463 3464// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate. 3465func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { 3466 objectMap := make(map[string]interface{}) 3467 if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil { 3468 objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat 3469 } 3470 if agsc.Name != nil { 3471 objectMap["name"] = agsc.Name 3472 } 3473 if agsc.Etag != nil { 3474 objectMap["etag"] = agsc.Etag 3475 } 3476 if agsc.Type != nil { 3477 objectMap["type"] = agsc.Type 3478 } 3479 if agsc.ID != nil { 3480 objectMap["id"] = agsc.ID 3481 } 3482 return json.Marshal(objectMap) 3483} 3484 3485// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct. 3486func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error { 3487 var m map[string]*json.RawMessage 3488 err := json.Unmarshal(body, &m) 3489 if err != nil { 3490 return err 3491 } 3492 for k, v := range m { 3493 switch k { 3494 case "properties": 3495 if v != nil { 3496 var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat 3497 err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat) 3498 if err != nil { 3499 return err 3500 } 3501 agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat 3502 } 3503 case "name": 3504 if v != nil { 3505 var name string 3506 err = json.Unmarshal(*v, &name) 3507 if err != nil { 3508 return err 3509 } 3510 agsc.Name = &name 3511 } 3512 case "etag": 3513 if v != nil { 3514 var etag string 3515 err = json.Unmarshal(*v, &etag) 3516 if err != nil { 3517 return err 3518 } 3519 agsc.Etag = &etag 3520 } 3521 case "type": 3522 if v != nil { 3523 var typeVar string 3524 err = json.Unmarshal(*v, &typeVar) 3525 if err != nil { 3526 return err 3527 } 3528 agsc.Type = &typeVar 3529 } 3530 case "id": 3531 if v != nil { 3532 var ID string 3533 err = json.Unmarshal(*v, &ID) 3534 if err != nil { 3535 return err 3536 } 3537 agsc.ID = &ID 3538 } 3539 } 3540 } 3541 3542 return nil 3543} 3544 3545// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway. 3546type ApplicationGatewaySslCertificatePropertiesFormat struct { 3547 // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request. 3548 Data *string `json:"data,omitempty"` 3549 // Password - Password for the pfx file specified in data. Only applicable in PUT request. 3550 Password *string `json:"password,omitempty"` 3551 // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. 3552 PublicCertData *string `json:"publicCertData,omitempty"` 3553 // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'. 3554 ProvisioningState *string `json:"provisioningState,omitempty"` 3555} 3556 3557// ApplicationGatewaySslPolicy application Gateway Ssl policy. 3558type ApplicationGatewaySslPolicy struct { 3559 // DisabledSslProtocols - Ssl protocols to be disabled on application gateway. 3560 DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` 3561 // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom' 3562 PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` 3563 // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S' 3564 PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` 3565 // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway. 3566 CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` 3567 // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' 3568 MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` 3569} 3570 3571// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy 3572type ApplicationGatewaySslPredefinedPolicy struct { 3573 autorest.Response `json:"-"` 3574 // Name - Name of Ssl predefined policy. 3575 Name *string `json:"name,omitempty"` 3576 *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` 3577 // ID - Resource ID. 3578 ID *string `json:"id,omitempty"` 3579} 3580 3581// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy. 3582func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) { 3583 objectMap := make(map[string]interface{}) 3584 if agspp.Name != nil { 3585 objectMap["name"] = agspp.Name 3586 } 3587 if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil { 3588 objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat 3589 } 3590 if agspp.ID != nil { 3591 objectMap["id"] = agspp.ID 3592 } 3593 return json.Marshal(objectMap) 3594} 3595 3596// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct. 3597func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error { 3598 var m map[string]*json.RawMessage 3599 err := json.Unmarshal(body, &m) 3600 if err != nil { 3601 return err 3602 } 3603 for k, v := range m { 3604 switch k { 3605 case "name": 3606 if v != nil { 3607 var name string 3608 err = json.Unmarshal(*v, &name) 3609 if err != nil { 3610 return err 3611 } 3612 agspp.Name = &name 3613 } 3614 case "properties": 3615 if v != nil { 3616 var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat 3617 err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat) 3618 if err != nil { 3619 return err 3620 } 3621 agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat 3622 } 3623 case "id": 3624 if v != nil { 3625 var ID string 3626 err = json.Unmarshal(*v, &ID) 3627 if err != nil { 3628 return err 3629 } 3630 agspp.ID = &ID 3631 } 3632 } 3633 } 3634 3635 return nil 3636} 3637 3638// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of ApplicationGatewaySslPredefinedPolicy 3639type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { 3640 // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway. 3641 CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` 3642 // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12' 3643 MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` 3644} 3645 3646// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running 3647// operation. 3648type ApplicationGatewaysStartFuture struct { 3649 azure.Future 3650 req *http.Request 3651} 3652 3653// Result returns the result of the asynchronous operation. 3654// If the operation has not completed it will return an error. 3655func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3656 var done bool 3657 done, err = future.Done(client) 3658 if err != nil { 3659 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure") 3660 return 3661 } 3662 if !done { 3663 return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture") 3664 } 3665 if future.PollingMethod() == azure.PollingLocation { 3666 ar, err = client.StartResponder(future.Response()) 3667 if err != nil { 3668 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request") 3669 } 3670 return 3671 } 3672 var req *http.Request 3673 var resp *http.Response 3674 if future.PollingURL() != "" { 3675 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3676 if err != nil { 3677 return 3678 } 3679 } else { 3680 req = autorest.ChangeToGet(future.req) 3681 } 3682 resp, err = autorest.SendWithSender(client, req, 3683 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3684 if err != nil { 3685 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request") 3686 return 3687 } 3688 ar, err = client.StartResponder(resp) 3689 if err != nil { 3690 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request") 3691 } 3692 return 3693} 3694 3695// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running 3696// operation. 3697type ApplicationGatewaysStopFuture struct { 3698 azure.Future 3699 req *http.Request 3700} 3701 3702// Result returns the result of the asynchronous operation. 3703// If the operation has not completed it will return an error. 3704func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) { 3705 var done bool 3706 done, err = future.Done(client) 3707 if err != nil { 3708 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure") 3709 return 3710 } 3711 if !done { 3712 return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture") 3713 } 3714 if future.PollingMethod() == azure.PollingLocation { 3715 ar, err = client.StopResponder(future.Response()) 3716 if err != nil { 3717 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request") 3718 } 3719 return 3720 } 3721 var req *http.Request 3722 var resp *http.Response 3723 if future.PollingURL() != "" { 3724 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3725 if err != nil { 3726 return 3727 } 3728 } else { 3729 req = autorest.ChangeToGet(future.req) 3730 } 3731 resp, err = autorest.SendWithSender(client, req, 3732 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3733 if err != nil { 3734 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request") 3735 return 3736 } 3737 ar, err = client.StopResponder(resp) 3738 if err != nil { 3739 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request") 3740 } 3741 return 3742} 3743 3744// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 3745// operation. 3746type ApplicationGatewaysUpdateTagsFuture struct { 3747 azure.Future 3748 req *http.Request 3749} 3750 3751// Result returns the result of the asynchronous operation. 3752// If the operation has not completed it will return an error. 3753func (future ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { 3754 var done bool 3755 done, err = future.Done(client) 3756 if err != nil { 3757 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 3758 return 3759 } 3760 if !done { 3761 return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture") 3762 } 3763 if future.PollingMethod() == azure.PollingLocation { 3764 ag, err = client.UpdateTagsResponder(future.Response()) 3765 if err != nil { 3766 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 3767 } 3768 return 3769 } 3770 var req *http.Request 3771 var resp *http.Response 3772 if future.PollingURL() != "" { 3773 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 3774 if err != nil { 3775 return 3776 } 3777 } else { 3778 req = autorest.ChangeToGet(future.req) 3779 } 3780 resp, err = autorest.SendWithSender(client, req, 3781 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3782 if err != nil { 3783 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request") 3784 return 3785 } 3786 ag, err = client.UpdateTagsResponder(resp) 3787 if err != nil { 3788 err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request") 3789 } 3790 return 3791} 3792 3793// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for 3794// PathBasedRouting. 3795type ApplicationGatewayURLPathMap struct { 3796 *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` 3797 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 3798 Name *string `json:"name,omitempty"` 3799 // Etag - A unique read-only string that changes whenever the resource is updated. 3800 Etag *string `json:"etag,omitempty"` 3801 // Type - Type of the resource. 3802 Type *string `json:"type,omitempty"` 3803 // ID - Resource ID. 3804 ID *string `json:"id,omitempty"` 3805} 3806 3807// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap. 3808func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { 3809 objectMap := make(map[string]interface{}) 3810 if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil { 3811 objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat 3812 } 3813 if agupm.Name != nil { 3814 objectMap["name"] = agupm.Name 3815 } 3816 if agupm.Etag != nil { 3817 objectMap["etag"] = agupm.Etag 3818 } 3819 if agupm.Type != nil { 3820 objectMap["type"] = agupm.Type 3821 } 3822 if agupm.ID != nil { 3823 objectMap["id"] = agupm.ID 3824 } 3825 return json.Marshal(objectMap) 3826} 3827 3828// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct. 3829func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error { 3830 var m map[string]*json.RawMessage 3831 err := json.Unmarshal(body, &m) 3832 if err != nil { 3833 return err 3834 } 3835 for k, v := range m { 3836 switch k { 3837 case "properties": 3838 if v != nil { 3839 var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat 3840 err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat) 3841 if err != nil { 3842 return err 3843 } 3844 agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat 3845 } 3846 case "name": 3847 if v != nil { 3848 var name string 3849 err = json.Unmarshal(*v, &name) 3850 if err != nil { 3851 return err 3852 } 3853 agupm.Name = &name 3854 } 3855 case "etag": 3856 if v != nil { 3857 var etag string 3858 err = json.Unmarshal(*v, &etag) 3859 if err != nil { 3860 return err 3861 } 3862 agupm.Etag = &etag 3863 } 3864 case "type": 3865 if v != nil { 3866 var typeVar string 3867 err = json.Unmarshal(*v, &typeVar) 3868 if err != nil { 3869 return err 3870 } 3871 agupm.Type = &typeVar 3872 } 3873 case "id": 3874 if v != nil { 3875 var ID string 3876 err = json.Unmarshal(*v, &ID) 3877 if err != nil { 3878 return err 3879 } 3880 agupm.ID = &ID 3881 } 3882 } 3883 } 3884 3885 return nil 3886} 3887 3888// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway. 3889type ApplicationGatewayURLPathMapPropertiesFormat struct { 3890 // DefaultBackendAddressPool - Default backend address pool resource of URL path map. 3891 DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` 3892 // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map. 3893 DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` 3894 // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. 3895 DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` 3896 // PathRules - Path rule of URL path map resource. 3897 PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` 3898 // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 3899 ProvisioningState *string `json:"provisioningState,omitempty"` 3900} 3901 3902// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall 3903// configuration. 3904type ApplicationGatewayWebApplicationFirewallConfiguration struct { 3905 // Enabled - Whether the web application firewall is enabled or not. 3906 Enabled *bool `json:"enabled,omitempty"` 3907 // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention' 3908 FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` 3909 // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'. 3910 RuleSetType *string `json:"ruleSetType,omitempty"` 3911 // RuleSetVersion - The version of the rule set type. 3912 RuleSetVersion *string `json:"ruleSetVersion,omitempty"` 3913 // DisabledRuleGroups - The disabled rule groups. 3914 DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` 3915 // RequestBodyCheck - Whether allow WAF to check request Body. 3916 RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` 3917 // MaxRequestBodySize - Maxium request body size for WAF. 3918 MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"` 3919} 3920 3921// ApplicationSecurityGroup an application security group in a resource group. 3922type ApplicationSecurityGroup struct { 3923 autorest.Response `json:"-"` 3924 // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group. 3925 *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` 3926 // Etag - A unique read-only string that changes whenever the resource is updated. 3927 Etag *string `json:"etag,omitempty"` 3928 // ID - Resource ID. 3929 ID *string `json:"id,omitempty"` 3930 // Name - Resource name. 3931 Name *string `json:"name,omitempty"` 3932 // Type - Resource type. 3933 Type *string `json:"type,omitempty"` 3934 // Location - Resource location. 3935 Location *string `json:"location,omitempty"` 3936 // Tags - Resource tags. 3937 Tags map[string]*string `json:"tags"` 3938} 3939 3940// MarshalJSON is the custom marshaler for ApplicationSecurityGroup. 3941func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { 3942 objectMap := make(map[string]interface{}) 3943 if asg.ApplicationSecurityGroupPropertiesFormat != nil { 3944 objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat 3945 } 3946 if asg.Etag != nil { 3947 objectMap["etag"] = asg.Etag 3948 } 3949 if asg.ID != nil { 3950 objectMap["id"] = asg.ID 3951 } 3952 if asg.Name != nil { 3953 objectMap["name"] = asg.Name 3954 } 3955 if asg.Type != nil { 3956 objectMap["type"] = asg.Type 3957 } 3958 if asg.Location != nil { 3959 objectMap["location"] = asg.Location 3960 } 3961 if asg.Tags != nil { 3962 objectMap["tags"] = asg.Tags 3963 } 3964 return json.Marshal(objectMap) 3965} 3966 3967// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct. 3968func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error { 3969 var m map[string]*json.RawMessage 3970 err := json.Unmarshal(body, &m) 3971 if err != nil { 3972 return err 3973 } 3974 for k, v := range m { 3975 switch k { 3976 case "properties": 3977 if v != nil { 3978 var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat 3979 err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat) 3980 if err != nil { 3981 return err 3982 } 3983 asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat 3984 } 3985 case "etag": 3986 if v != nil { 3987 var etag string 3988 err = json.Unmarshal(*v, &etag) 3989 if err != nil { 3990 return err 3991 } 3992 asg.Etag = &etag 3993 } 3994 case "id": 3995 if v != nil { 3996 var ID string 3997 err = json.Unmarshal(*v, &ID) 3998 if err != nil { 3999 return err 4000 } 4001 asg.ID = &ID 4002 } 4003 case "name": 4004 if v != nil { 4005 var name string 4006 err = json.Unmarshal(*v, &name) 4007 if err != nil { 4008 return err 4009 } 4010 asg.Name = &name 4011 } 4012 case "type": 4013 if v != nil { 4014 var typeVar string 4015 err = json.Unmarshal(*v, &typeVar) 4016 if err != nil { 4017 return err 4018 } 4019 asg.Type = &typeVar 4020 } 4021 case "location": 4022 if v != nil { 4023 var location string 4024 err = json.Unmarshal(*v, &location) 4025 if err != nil { 4026 return err 4027 } 4028 asg.Location = &location 4029 } 4030 case "tags": 4031 if v != nil { 4032 var tags map[string]*string 4033 err = json.Unmarshal(*v, &tags) 4034 if err != nil { 4035 return err 4036 } 4037 asg.Tags = tags 4038 } 4039 } 4040 } 4041 4042 return nil 4043} 4044 4045// ApplicationSecurityGroupListResult a list of application security groups. 4046type ApplicationSecurityGroupListResult struct { 4047 autorest.Response `json:"-"` 4048 // Value - A list of application security groups. 4049 Value *[]ApplicationSecurityGroup `json:"value,omitempty"` 4050 // NextLink - The URL to get the next set of results. 4051 NextLink *string `json:"nextLink,omitempty"` 4052} 4053 4054// ApplicationSecurityGroupListResultIterator provides access to a complete listing of ApplicationSecurityGroup 4055// values. 4056type ApplicationSecurityGroupListResultIterator struct { 4057 i int 4058 page ApplicationSecurityGroupListResultPage 4059} 4060 4061// Next advances to the next value. If there was an error making 4062// the request the iterator does not advance and the error is returned. 4063func (iter *ApplicationSecurityGroupListResultIterator) Next() error { 4064 iter.i++ 4065 if iter.i < len(iter.page.Values()) { 4066 return nil 4067 } 4068 err := iter.page.Next() 4069 if err != nil { 4070 iter.i-- 4071 return err 4072 } 4073 iter.i = 0 4074 return nil 4075} 4076 4077// NotDone returns true if the enumeration should be started or is not yet complete. 4078func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool { 4079 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4080} 4081 4082// Response returns the raw server response from the last page request. 4083func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult { 4084 return iter.page.Response() 4085} 4086 4087// Value returns the current value or a zero-initialized value if the 4088// iterator has advanced beyond the end of the collection. 4089func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup { 4090 if !iter.page.NotDone() { 4091 return ApplicationSecurityGroup{} 4092 } 4093 return iter.page.Values()[iter.i] 4094} 4095 4096// IsEmpty returns true if the ListResult contains no values. 4097func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool { 4098 return asglr.Value == nil || len(*asglr.Value) == 0 4099} 4100 4101// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results. 4102// It returns nil if no more results exist. 4103func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer() (*http.Request, error) { 4104 if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 { 4105 return nil, nil 4106 } 4107 return autorest.Prepare(&http.Request{}, 4108 autorest.AsJSON(), 4109 autorest.AsGet(), 4110 autorest.WithBaseURL(to.String(asglr.NextLink))) 4111} 4112 4113// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values. 4114type ApplicationSecurityGroupListResultPage struct { 4115 fn func(ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error) 4116 asglr ApplicationSecurityGroupListResult 4117} 4118 4119// Next advances to the next page of values. If there was an error making 4120// the request the page does not advance and the error is returned. 4121func (page *ApplicationSecurityGroupListResultPage) Next() error { 4122 next, err := page.fn(page.asglr) 4123 if err != nil { 4124 return err 4125 } 4126 page.asglr = next 4127 return nil 4128} 4129 4130// NotDone returns true if the page enumeration should be started or is not yet complete. 4131func (page ApplicationSecurityGroupListResultPage) NotDone() bool { 4132 return !page.asglr.IsEmpty() 4133} 4134 4135// Response returns the raw server response from the last page request. 4136func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult { 4137 return page.asglr 4138} 4139 4140// Values returns the slice of values for the current page or nil if there are no values. 4141func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup { 4142 if page.asglr.IsEmpty() { 4143 return nil 4144 } 4145 return *page.asglr.Value 4146} 4147 4148// ApplicationSecurityGroupPropertiesFormat application security group properties. 4149type ApplicationSecurityGroupPropertiesFormat struct { 4150 // ResourceGUID - The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. 4151 ResourceGUID *string `json:"resourceGuid,omitempty"` 4152 // ProvisioningState - The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. 4153 ProvisioningState *string `json:"provisioningState,omitempty"` 4154} 4155 4156// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 4157// long-running operation. 4158type ApplicationSecurityGroupsCreateOrUpdateFuture struct { 4159 azure.Future 4160 req *http.Request 4161} 4162 4163// Result returns the result of the asynchronous operation. 4164// If the operation has not completed it will return an error. 4165func (future ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { 4166 var done bool 4167 done, err = future.Done(client) 4168 if err != nil { 4169 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 4170 return 4171 } 4172 if !done { 4173 return asg, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture") 4174 } 4175 if future.PollingMethod() == azure.PollingLocation { 4176 asg, err = client.CreateOrUpdateResponder(future.Response()) 4177 if err != nil { 4178 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 4179 } 4180 return 4181 } 4182 var req *http.Request 4183 var resp *http.Response 4184 if future.PollingURL() != "" { 4185 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 4186 if err != nil { 4187 return 4188 } 4189 } else { 4190 req = autorest.ChangeToGet(future.req) 4191 } 4192 resp, err = autorest.SendWithSender(client, req, 4193 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4194 if err != nil { 4195 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 4196 return 4197 } 4198 asg, err = client.CreateOrUpdateResponder(resp) 4199 if err != nil { 4200 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 4201 } 4202 return 4203} 4204 4205// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 4206// operation. 4207type ApplicationSecurityGroupsDeleteFuture struct { 4208 azure.Future 4209 req *http.Request 4210} 4211 4212// Result returns the result of the asynchronous operation. 4213// If the operation has not completed it will return an error. 4214func (future ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) { 4215 var done bool 4216 done, err = future.Done(client) 4217 if err != nil { 4218 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") 4219 return 4220 } 4221 if !done { 4222 return ar, azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture") 4223 } 4224 if future.PollingMethod() == azure.PollingLocation { 4225 ar, err = client.DeleteResponder(future.Response()) 4226 if err != nil { 4227 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request") 4228 } 4229 return 4230 } 4231 var req *http.Request 4232 var resp *http.Response 4233 if future.PollingURL() != "" { 4234 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 4235 if err != nil { 4236 return 4237 } 4238 } else { 4239 req = autorest.ChangeToGet(future.req) 4240 } 4241 resp, err = autorest.SendWithSender(client, req, 4242 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 4243 if err != nil { 4244 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure sending request") 4245 return 4246 } 4247 ar, err = client.DeleteResponder(resp) 4248 if err != nil { 4249 err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request") 4250 } 4251 return 4252} 4253 4254// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that 4255// belongs to an ExpressRouteCircuit. 4256type AuthorizationListResult struct { 4257 autorest.Response `json:"-"` 4258 // Value - The authorizations in an ExpressRoute Circuit. 4259 Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` 4260 // NextLink - The URL to get the next set of results. 4261 NextLink *string `json:"nextLink,omitempty"` 4262} 4263 4264// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization 4265// values. 4266type AuthorizationListResultIterator struct { 4267 i int 4268 page AuthorizationListResultPage 4269} 4270 4271// Next advances to the next value. If there was an error making 4272// the request the iterator does not advance and the error is returned. 4273func (iter *AuthorizationListResultIterator) Next() error { 4274 iter.i++ 4275 if iter.i < len(iter.page.Values()) { 4276 return nil 4277 } 4278 err := iter.page.Next() 4279 if err != nil { 4280 iter.i-- 4281 return err 4282 } 4283 iter.i = 0 4284 return nil 4285} 4286 4287// NotDone returns true if the enumeration should be started or is not yet complete. 4288func (iter AuthorizationListResultIterator) NotDone() bool { 4289 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4290} 4291 4292// Response returns the raw server response from the last page request. 4293func (iter AuthorizationListResultIterator) Response() AuthorizationListResult { 4294 return iter.page.Response() 4295} 4296 4297// Value returns the current value or a zero-initialized value if the 4298// iterator has advanced beyond the end of the collection. 4299func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization { 4300 if !iter.page.NotDone() { 4301 return ExpressRouteCircuitAuthorization{} 4302 } 4303 return iter.page.Values()[iter.i] 4304} 4305 4306// IsEmpty returns true if the ListResult contains no values. 4307func (alr AuthorizationListResult) IsEmpty() bool { 4308 return alr.Value == nil || len(*alr.Value) == 0 4309} 4310 4311// authorizationListResultPreparer prepares a request to retrieve the next set of results. 4312// It returns nil if no more results exist. 4313func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Request, error) { 4314 if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { 4315 return nil, nil 4316 } 4317 return autorest.Prepare(&http.Request{}, 4318 autorest.AsJSON(), 4319 autorest.AsGet(), 4320 autorest.WithBaseURL(to.String(alr.NextLink))) 4321} 4322 4323// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values. 4324type AuthorizationListResultPage struct { 4325 fn func(AuthorizationListResult) (AuthorizationListResult, error) 4326 alr AuthorizationListResult 4327} 4328 4329// Next advances to the next page of values. If there was an error making 4330// the request the page does not advance and the error is returned. 4331func (page *AuthorizationListResultPage) Next() error { 4332 next, err := page.fn(page.alr) 4333 if err != nil { 4334 return err 4335 } 4336 page.alr = next 4337 return nil 4338} 4339 4340// NotDone returns true if the page enumeration should be started or is not yet complete. 4341func (page AuthorizationListResultPage) NotDone() bool { 4342 return !page.alr.IsEmpty() 4343} 4344 4345// Response returns the raw server response from the last page request. 4346func (page AuthorizationListResultPage) Response() AuthorizationListResult { 4347 return page.alr 4348} 4349 4350// Values returns the slice of values for the current page or nil if there are no values. 4351func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization { 4352 if page.alr.IsEmpty() { 4353 return nil 4354 } 4355 return *page.alr.Value 4356} 4357 4358// AuthorizationPropertiesFormat ... 4359type AuthorizationPropertiesFormat struct { 4360 // AuthorizationKey - The authorization key. 4361 AuthorizationKey *string `json:"authorizationKey,omitempty"` 4362 // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse' 4363 AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` 4364 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 4365 ProvisioningState *string `json:"provisioningState,omitempty"` 4366} 4367 4368// Availability availability of the metric. 4369type Availability struct { 4370 // TimeGrain - The time grain of the availability. 4371 TimeGrain *string `json:"timeGrain,omitempty"` 4372 // Retention - The retention of the availability. 4373 Retention *string `json:"retention,omitempty"` 4374 // BlobDuration - Duration of the availability blob. 4375 BlobDuration *string `json:"blobDuration,omitempty"` 4376} 4377 4378// AvailableProvidersList list of available countries with details. 4379type AvailableProvidersList struct { 4380 autorest.Response `json:"-"` 4381 // Countries - List of available countries. 4382 Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"` 4383} 4384 4385// AvailableProvidersListCity city or town details. 4386type AvailableProvidersListCity struct { 4387 // CityName - The city or town name. 4388 CityName *string `json:"cityName,omitempty"` 4389 // Providers - A list of Internet service providers. 4390 Providers *[]string `json:"providers,omitempty"` 4391} 4392 4393// AvailableProvidersListCountry country details. 4394type AvailableProvidersListCountry struct { 4395 // CountryName - The country name. 4396 CountryName *string `json:"countryName,omitempty"` 4397 // Providers - A list of Internet service providers. 4398 Providers *[]string `json:"providers,omitempty"` 4399 // States - List of available states in the country. 4400 States *[]AvailableProvidersListState `json:"states,omitempty"` 4401} 4402 4403// AvailableProvidersListParameters constraints that determine the list of available Internet service providers. 4404type AvailableProvidersListParameters struct { 4405 // AzureLocations - A list of Azure regions. 4406 AzureLocations *[]string `json:"azureLocations,omitempty"` 4407 // Country - The country for available providers list. 4408 Country *string `json:"country,omitempty"` 4409 // State - The state for available providers list. 4410 State *string `json:"state,omitempty"` 4411 // City - The city or town for available providers list. 4412 City *string `json:"city,omitempty"` 4413} 4414 4415// AvailableProvidersListState state details. 4416type AvailableProvidersListState struct { 4417 // StateName - The state name. 4418 StateName *string `json:"stateName,omitempty"` 4419 // Providers - A list of Internet service providers. 4420 Providers *[]string `json:"providers,omitempty"` 4421 // Cities - List of available cities or towns in the state. 4422 Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` 4423} 4424 4425// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, 4426// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the 4427// HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation 4428// succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous 4429// operation failed, the response body includes the HTTP status code for the failed request and error information 4430// regarding the failure. 4431type AzureAsyncOperationResult struct { 4432 // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' 4433 Status OperationStatus `json:"status,omitempty"` 4434 Error *Error `json:"error,omitempty"` 4435} 4436 4437// AzureReachabilityReport azure reachability report details. 4438type AzureReachabilityReport struct { 4439 autorest.Response `json:"-"` 4440 // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. 4441 AggregationLevel *string `json:"aggregationLevel,omitempty"` 4442 ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` 4443 // ReachabilityReport - List of Azure reachability report items. 4444 ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` 4445} 4446 4447// AzureReachabilityReportItem azure reachability report details for a given provider location. 4448type AzureReachabilityReportItem struct { 4449 // Provider - The Internet service provider. 4450 Provider *string `json:"provider,omitempty"` 4451 // AzureLocation - The Azure region. 4452 AzureLocation *string `json:"azureLocation,omitempty"` 4453 // Latencies - List of latency details for each of the time series. 4454 Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` 4455} 4456 4457// AzureReachabilityReportLatencyInfo details on latency for a time series. 4458type AzureReachabilityReportLatencyInfo struct { 4459 // TimeStamp - The time stamp. 4460 TimeStamp *date.Time `json:"timeStamp,omitempty"` 4461 // Score - The relative latency score between 1 and 100, higher values indicating a faster connection. 4462 Score *int32 `json:"score,omitempty"` 4463} 4464 4465// AzureReachabilityReportLocation parameters that define a geographic location. 4466type AzureReachabilityReportLocation struct { 4467 // Country - The name of the country. 4468 Country *string `json:"country,omitempty"` 4469 // State - The name of the state. 4470 State *string `json:"state,omitempty"` 4471 // City - The name of the city or town. 4472 City *string `json:"city,omitempty"` 4473} 4474 4475// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. 4476type AzureReachabilityReportParameters struct { 4477 ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` 4478 // Providers - List of Internet service providers. 4479 Providers *[]string `json:"providers,omitempty"` 4480 // AzureLocations - Optional Azure regions to scope the query to. 4481 AzureLocations *[]string `json:"azureLocations,omitempty"` 4482 // StartTime - The start time for the Azure reachability report. 4483 StartTime *date.Time `json:"startTime,omitempty"` 4484 // EndTime - The end time for the Azure reachability report. 4485 EndTime *date.Time `json:"endTime,omitempty"` 4486} 4487 4488// BackendAddressPool pool of backend IP addresses. 4489type BackendAddressPool struct { 4490 autorest.Response `json:"-"` 4491 // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. 4492 *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` 4493 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 4494 Name *string `json:"name,omitempty"` 4495 // Etag - A unique read-only string that changes whenever the resource is updated. 4496 Etag *string `json:"etag,omitempty"` 4497 // ID - Resource ID. 4498 ID *string `json:"id,omitempty"` 4499} 4500 4501// MarshalJSON is the custom marshaler for BackendAddressPool. 4502func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { 4503 objectMap := make(map[string]interface{}) 4504 if bap.BackendAddressPoolPropertiesFormat != nil { 4505 objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat 4506 } 4507 if bap.Name != nil { 4508 objectMap["name"] = bap.Name 4509 } 4510 if bap.Etag != nil { 4511 objectMap["etag"] = bap.Etag 4512 } 4513 if bap.ID != nil { 4514 objectMap["id"] = bap.ID 4515 } 4516 return json.Marshal(objectMap) 4517} 4518 4519// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct. 4520func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { 4521 var m map[string]*json.RawMessage 4522 err := json.Unmarshal(body, &m) 4523 if err != nil { 4524 return err 4525 } 4526 for k, v := range m { 4527 switch k { 4528 case "properties": 4529 if v != nil { 4530 var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat 4531 err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat) 4532 if err != nil { 4533 return err 4534 } 4535 bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat 4536 } 4537 case "name": 4538 if v != nil { 4539 var name string 4540 err = json.Unmarshal(*v, &name) 4541 if err != nil { 4542 return err 4543 } 4544 bap.Name = &name 4545 } 4546 case "etag": 4547 if v != nil { 4548 var etag string 4549 err = json.Unmarshal(*v, &etag) 4550 if err != nil { 4551 return err 4552 } 4553 bap.Etag = &etag 4554 } 4555 case "id": 4556 if v != nil { 4557 var ID string 4558 err = json.Unmarshal(*v, &ID) 4559 if err != nil { 4560 return err 4561 } 4562 bap.ID = &ID 4563 } 4564 } 4565 } 4566 4567 return nil 4568} 4569 4570// BackendAddressPoolPropertiesFormat properties of the backend address pool. 4571type BackendAddressPoolPropertiesFormat struct { 4572 // BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces. 4573 BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` 4574 // LoadBalancingRules - Gets load balancing rules that use this backend address pool. 4575 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 4576 // OutboundNatRule - Gets outbound rules that use this backend address pool. 4577 OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"` 4578 // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 4579 ProvisioningState *string `json:"provisioningState,omitempty"` 4580} 4581 4582// BGPCommunity contains bgp community information offered in Service Community resources. 4583type BGPCommunity struct { 4584 // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. 4585 ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` 4586 // CommunityName - The name of the bgp community. e.g. Skype. 4587 CommunityName *string `json:"communityName,omitempty"` 4588 // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. 4589 CommunityValue *string `json:"communityValue,omitempty"` 4590 // CommunityPrefixes - The prefixes that the bgp community contains. 4591 CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` 4592 // IsAuthorizedToUse - Customer is authorized to use bgp community or not. 4593 IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` 4594 // ServiceGroup - The service group of the bgp community contains. 4595 ServiceGroup *string `json:"serviceGroup,omitempty"` 4596} 4597 4598// BgpPeerStatus BGP peer status details 4599type BgpPeerStatus struct { 4600 // LocalAddress - The virtual network gateway's local address 4601 LocalAddress *string `json:"localAddress,omitempty"` 4602 // Neighbor - The remote BGP peer 4603 Neighbor *string `json:"neighbor,omitempty"` 4604 // Asn - The autonomous system number of the remote BGP peer 4605 Asn *int32 `json:"asn,omitempty"` 4606 // State - The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' 4607 State BgpPeerState `json:"state,omitempty"` 4608 // ConnectedDuration - For how long the peering has been up 4609 ConnectedDuration *string `json:"connectedDuration,omitempty"` 4610 // RoutesReceived - The number of routes learned from this peer 4611 RoutesReceived *int64 `json:"routesReceived,omitempty"` 4612 // MessagesSent - The number of BGP messages sent 4613 MessagesSent *int64 `json:"messagesSent,omitempty"` 4614 // MessagesReceived - The number of BGP messages received 4615 MessagesReceived *int64 `json:"messagesReceived,omitempty"` 4616} 4617 4618// BgpPeerStatusListResult response for list BGP peer status API service call 4619type BgpPeerStatusListResult struct { 4620 autorest.Response `json:"-"` 4621 // Value - List of BGP peers 4622 Value *[]BgpPeerStatus `json:"value,omitempty"` 4623} 4624 4625// BgpServiceCommunity service Community Properties. 4626type BgpServiceCommunity struct { 4627 *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` 4628 // ID - Resource ID. 4629 ID *string `json:"id,omitempty"` 4630 // Name - Resource name. 4631 Name *string `json:"name,omitempty"` 4632 // Type - Resource type. 4633 Type *string `json:"type,omitempty"` 4634 // Location - Resource location. 4635 Location *string `json:"location,omitempty"` 4636 // Tags - Resource tags. 4637 Tags map[string]*string `json:"tags"` 4638} 4639 4640// MarshalJSON is the custom marshaler for BgpServiceCommunity. 4641func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { 4642 objectMap := make(map[string]interface{}) 4643 if bsc.BgpServiceCommunityPropertiesFormat != nil { 4644 objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat 4645 } 4646 if bsc.ID != nil { 4647 objectMap["id"] = bsc.ID 4648 } 4649 if bsc.Name != nil { 4650 objectMap["name"] = bsc.Name 4651 } 4652 if bsc.Type != nil { 4653 objectMap["type"] = bsc.Type 4654 } 4655 if bsc.Location != nil { 4656 objectMap["location"] = bsc.Location 4657 } 4658 if bsc.Tags != nil { 4659 objectMap["tags"] = bsc.Tags 4660 } 4661 return json.Marshal(objectMap) 4662} 4663 4664// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. 4665func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { 4666 var m map[string]*json.RawMessage 4667 err := json.Unmarshal(body, &m) 4668 if err != nil { 4669 return err 4670 } 4671 for k, v := range m { 4672 switch k { 4673 case "properties": 4674 if v != nil { 4675 var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat 4676 err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) 4677 if err != nil { 4678 return err 4679 } 4680 bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat 4681 } 4682 case "id": 4683 if v != nil { 4684 var ID string 4685 err = json.Unmarshal(*v, &ID) 4686 if err != nil { 4687 return err 4688 } 4689 bsc.ID = &ID 4690 } 4691 case "name": 4692 if v != nil { 4693 var name string 4694 err = json.Unmarshal(*v, &name) 4695 if err != nil { 4696 return err 4697 } 4698 bsc.Name = &name 4699 } 4700 case "type": 4701 if v != nil { 4702 var typeVar string 4703 err = json.Unmarshal(*v, &typeVar) 4704 if err != nil { 4705 return err 4706 } 4707 bsc.Type = &typeVar 4708 } 4709 case "location": 4710 if v != nil { 4711 var location string 4712 err = json.Unmarshal(*v, &location) 4713 if err != nil { 4714 return err 4715 } 4716 bsc.Location = &location 4717 } 4718 case "tags": 4719 if v != nil { 4720 var tags map[string]*string 4721 err = json.Unmarshal(*v, &tags) 4722 if err != nil { 4723 return err 4724 } 4725 bsc.Tags = tags 4726 } 4727 } 4728 } 4729 4730 return nil 4731} 4732 4733// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. 4734type BgpServiceCommunityListResult struct { 4735 autorest.Response `json:"-"` 4736 // Value - A list of service community resources. 4737 Value *[]BgpServiceCommunity `json:"value,omitempty"` 4738 // NextLink - The URL to get the next set of results. 4739 NextLink *string `json:"nextLink,omitempty"` 4740} 4741 4742// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values. 4743type BgpServiceCommunityListResultIterator struct { 4744 i int 4745 page BgpServiceCommunityListResultPage 4746} 4747 4748// Next advances to the next value. If there was an error making 4749// the request the iterator does not advance and the error is returned. 4750func (iter *BgpServiceCommunityListResultIterator) Next() error { 4751 iter.i++ 4752 if iter.i < len(iter.page.Values()) { 4753 return nil 4754 } 4755 err := iter.page.Next() 4756 if err != nil { 4757 iter.i-- 4758 return err 4759 } 4760 iter.i = 0 4761 return nil 4762} 4763 4764// NotDone returns true if the enumeration should be started or is not yet complete. 4765func (iter BgpServiceCommunityListResultIterator) NotDone() bool { 4766 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4767} 4768 4769// Response returns the raw server response from the last page request. 4770func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { 4771 return iter.page.Response() 4772} 4773 4774// Value returns the current value or a zero-initialized value if the 4775// iterator has advanced beyond the end of the collection. 4776func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { 4777 if !iter.page.NotDone() { 4778 return BgpServiceCommunity{} 4779 } 4780 return iter.page.Values()[iter.i] 4781} 4782 4783// IsEmpty returns true if the ListResult contains no values. 4784func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { 4785 return bsclr.Value == nil || len(*bsclr.Value) == 0 4786} 4787 4788// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. 4789// It returns nil if no more results exist. 4790func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer() (*http.Request, error) { 4791 if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { 4792 return nil, nil 4793 } 4794 return autorest.Prepare(&http.Request{}, 4795 autorest.AsJSON(), 4796 autorest.AsGet(), 4797 autorest.WithBaseURL(to.String(bsclr.NextLink))) 4798} 4799 4800// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. 4801type BgpServiceCommunityListResultPage struct { 4802 fn func(BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) 4803 bsclr BgpServiceCommunityListResult 4804} 4805 4806// Next advances to the next page of values. If there was an error making 4807// the request the page does not advance and the error is returned. 4808func (page *BgpServiceCommunityListResultPage) Next() error { 4809 next, err := page.fn(page.bsclr) 4810 if err != nil { 4811 return err 4812 } 4813 page.bsclr = next 4814 return nil 4815} 4816 4817// NotDone returns true if the page enumeration should be started or is not yet complete. 4818func (page BgpServiceCommunityListResultPage) NotDone() bool { 4819 return !page.bsclr.IsEmpty() 4820} 4821 4822// Response returns the raw server response from the last page request. 4823func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { 4824 return page.bsclr 4825} 4826 4827// Values returns the slice of values for the current page or nil if there are no values. 4828func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { 4829 if page.bsclr.IsEmpty() { 4830 return nil 4831 } 4832 return *page.bsclr.Value 4833} 4834 4835// BgpServiceCommunityPropertiesFormat properties of Service Community. 4836type BgpServiceCommunityPropertiesFormat struct { 4837 // ServiceName - The name of the bgp community. e.g. Skype. 4838 ServiceName *string `json:"serviceName,omitempty"` 4839 // BgpCommunities - Get a list of bgp communities. 4840 BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` 4841} 4842 4843// BgpSettings BGP settings details 4844type BgpSettings struct { 4845 // Asn - The BGP speaker's ASN. 4846 Asn *int64 `json:"asn,omitempty"` 4847 // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. 4848 BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` 4849 // PeerWeight - The weight added to routes learned from this BGP speaker. 4850 PeerWeight *int32 `json:"peerWeight,omitempty"` 4851} 4852 4853// ConnectionMonitor parameters that define the operation to create a connection monitor. 4854type ConnectionMonitor struct { 4855 // Location - Connection monitor location. 4856 Location *string `json:"location,omitempty"` 4857 // Tags - Connection monitor tags. 4858 Tags map[string]*string `json:"tags"` 4859 *ConnectionMonitorParameters `json:"properties,omitempty"` 4860} 4861 4862// MarshalJSON is the custom marshaler for ConnectionMonitor. 4863func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { 4864 objectMap := make(map[string]interface{}) 4865 if cm.Location != nil { 4866 objectMap["location"] = cm.Location 4867 } 4868 if cm.Tags != nil { 4869 objectMap["tags"] = cm.Tags 4870 } 4871 if cm.ConnectionMonitorParameters != nil { 4872 objectMap["properties"] = cm.ConnectionMonitorParameters 4873 } 4874 return json.Marshal(objectMap) 4875} 4876 4877// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. 4878func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { 4879 var m map[string]*json.RawMessage 4880 err := json.Unmarshal(body, &m) 4881 if err != nil { 4882 return err 4883 } 4884 for k, v := range m { 4885 switch k { 4886 case "location": 4887 if v != nil { 4888 var location string 4889 err = json.Unmarshal(*v, &location) 4890 if err != nil { 4891 return err 4892 } 4893 cm.Location = &location 4894 } 4895 case "tags": 4896 if v != nil { 4897 var tags map[string]*string 4898 err = json.Unmarshal(*v, &tags) 4899 if err != nil { 4900 return err 4901 } 4902 cm.Tags = tags 4903 } 4904 case "properties": 4905 if v != nil { 4906 var connectionMonitorParameters ConnectionMonitorParameters 4907 err = json.Unmarshal(*v, &connectionMonitorParameters) 4908 if err != nil { 4909 return err 4910 } 4911 cm.ConnectionMonitorParameters = &connectionMonitorParameters 4912 } 4913 } 4914 } 4915 4916 return nil 4917} 4918 4919// ConnectionMonitorDestination describes the destination of connection monitor. 4920type ConnectionMonitorDestination struct { 4921 // ResourceID - The ID of the resource used as the destination by connection monitor. 4922 ResourceID *string `json:"resourceId,omitempty"` 4923 // Address - Address of the connection monitor destination (IP or domain name). 4924 Address *string `json:"address,omitempty"` 4925 // Port - The destination port used by connection monitor. 4926 Port *int32 `json:"port,omitempty"` 4927} 4928 4929// ConnectionMonitorListResult list of connection monitors. 4930type ConnectionMonitorListResult struct { 4931 autorest.Response `json:"-"` 4932 // Value - Information about connection monitors. 4933 Value *[]ConnectionMonitorResult `json:"value,omitempty"` 4934} 4935 4936// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. 4937type ConnectionMonitorParameters struct { 4938 Source *ConnectionMonitorSource `json:"source,omitempty"` 4939 Destination *ConnectionMonitorDestination `json:"destination,omitempty"` 4940 // AutoStart - Determines if the connection monitor will start automatically once created. 4941 AutoStart *bool `json:"autoStart,omitempty"` 4942 // MonitoringIntervalInSeconds - Monitoring interval in seconds. 4943 MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` 4944} 4945 4946// ConnectionMonitorQueryResult list of connection states snaphots. 4947type ConnectionMonitorQueryResult struct { 4948 autorest.Response `json:"-"` 4949 // SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive' 4950 SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` 4951 // States - Information about connection states. 4952 States *[]ConnectionStateSnapshot `json:"states,omitempty"` 4953} 4954 4955// ConnectionMonitorResult information about the connection monitor. 4956type ConnectionMonitorResult struct { 4957 autorest.Response `json:"-"` 4958 // Name - Name of the connection monitor. 4959 Name *string `json:"name,omitempty"` 4960 // ID - ID of the connection monitor. 4961 ID *string `json:"id,omitempty"` 4962 Etag *string `json:"etag,omitempty"` 4963 // Type - Connection monitor type. 4964 Type *string `json:"type,omitempty"` 4965 // Location - Connection monitor location. 4966 Location *string `json:"location,omitempty"` 4967 // Tags - Connection monitor tags. 4968 Tags map[string]*string `json:"tags"` 4969 *ConnectionMonitorResultProperties `json:"properties,omitempty"` 4970} 4971 4972// MarshalJSON is the custom marshaler for ConnectionMonitorResult. 4973func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { 4974 objectMap := make(map[string]interface{}) 4975 if cmr.Name != nil { 4976 objectMap["name"] = cmr.Name 4977 } 4978 if cmr.ID != nil { 4979 objectMap["id"] = cmr.ID 4980 } 4981 if cmr.Etag != nil { 4982 objectMap["etag"] = cmr.Etag 4983 } 4984 if cmr.Type != nil { 4985 objectMap["type"] = cmr.Type 4986 } 4987 if cmr.Location != nil { 4988 objectMap["location"] = cmr.Location 4989 } 4990 if cmr.Tags != nil { 4991 objectMap["tags"] = cmr.Tags 4992 } 4993 if cmr.ConnectionMonitorResultProperties != nil { 4994 objectMap["properties"] = cmr.ConnectionMonitorResultProperties 4995 } 4996 return json.Marshal(objectMap) 4997} 4998 4999// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. 5000func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { 5001 var m map[string]*json.RawMessage 5002 err := json.Unmarshal(body, &m) 5003 if err != nil { 5004 return err 5005 } 5006 for k, v := range m { 5007 switch k { 5008 case "name": 5009 if v != nil { 5010 var name string 5011 err = json.Unmarshal(*v, &name) 5012 if err != nil { 5013 return err 5014 } 5015 cmr.Name = &name 5016 } 5017 case "id": 5018 if v != nil { 5019 var ID string 5020 err = json.Unmarshal(*v, &ID) 5021 if err != nil { 5022 return err 5023 } 5024 cmr.ID = &ID 5025 } 5026 case "etag": 5027 if v != nil { 5028 var etag string 5029 err = json.Unmarshal(*v, &etag) 5030 if err != nil { 5031 return err 5032 } 5033 cmr.Etag = &etag 5034 } 5035 case "type": 5036 if v != nil { 5037 var typeVar string 5038 err = json.Unmarshal(*v, &typeVar) 5039 if err != nil { 5040 return err 5041 } 5042 cmr.Type = &typeVar 5043 } 5044 case "location": 5045 if v != nil { 5046 var location string 5047 err = json.Unmarshal(*v, &location) 5048 if err != nil { 5049 return err 5050 } 5051 cmr.Location = &location 5052 } 5053 case "tags": 5054 if v != nil { 5055 var tags map[string]*string 5056 err = json.Unmarshal(*v, &tags) 5057 if err != nil { 5058 return err 5059 } 5060 cmr.Tags = tags 5061 } 5062 case "properties": 5063 if v != nil { 5064 var connectionMonitorResultProperties ConnectionMonitorResultProperties 5065 err = json.Unmarshal(*v, &connectionMonitorResultProperties) 5066 if err != nil { 5067 return err 5068 } 5069 cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties 5070 } 5071 } 5072 } 5073 5074 return nil 5075} 5076 5077// ConnectionMonitorResultProperties describes the properties of a connection monitor. 5078type ConnectionMonitorResultProperties struct { 5079 // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 5080 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5081 // StartTime - The date and time when the connection monitor was started. 5082 StartTime *date.Time `json:"startTime,omitempty"` 5083 // MonitoringStatus - The monitoring status of the connection monitor. 5084 MonitoringStatus *string `json:"monitoringStatus,omitempty"` 5085 Source *ConnectionMonitorSource `json:"source,omitempty"` 5086 Destination *ConnectionMonitorDestination `json:"destination,omitempty"` 5087 // AutoStart - Determines if the connection monitor will start automatically once created. 5088 AutoStart *bool `json:"autoStart,omitempty"` 5089 // MonitoringIntervalInSeconds - Monitoring interval in seconds. 5090 MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` 5091} 5092 5093// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 5094// long-running operation. 5095type ConnectionMonitorsCreateOrUpdateFuture struct { 5096 azure.Future 5097 req *http.Request 5098} 5099 5100// Result returns the result of the asynchronous operation. 5101// If the operation has not completed it will return an error. 5102func (future ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { 5103 var done bool 5104 done, err = future.Done(client) 5105 if err != nil { 5106 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 5107 return 5108 } 5109 if !done { 5110 return cmr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") 5111 } 5112 if future.PollingMethod() == azure.PollingLocation { 5113 cmr, err = client.CreateOrUpdateResponder(future.Response()) 5114 if err != nil { 5115 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 5116 } 5117 return 5118 } 5119 var req *http.Request 5120 var resp *http.Response 5121 if future.PollingURL() != "" { 5122 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5123 if err != nil { 5124 return 5125 } 5126 } else { 5127 req = autorest.ChangeToGet(future.req) 5128 } 5129 resp, err = autorest.SendWithSender(client, req, 5130 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5131 if err != nil { 5132 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 5133 return 5134 } 5135 cmr, err = client.CreateOrUpdateResponder(resp) 5136 if err != nil { 5137 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 5138 } 5139 return 5140} 5141 5142// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 5143// operation. 5144type ConnectionMonitorsDeleteFuture struct { 5145 azure.Future 5146 req *http.Request 5147} 5148 5149// Result returns the result of the asynchronous operation. 5150// If the operation has not completed it will return an error. 5151func (future ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5152 var done bool 5153 done, err = future.Done(client) 5154 if err != nil { 5155 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") 5156 return 5157 } 5158 if !done { 5159 return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") 5160 } 5161 if future.PollingMethod() == azure.PollingLocation { 5162 ar, err = client.DeleteResponder(future.Response()) 5163 if err != nil { 5164 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Failure responding to request") 5165 } 5166 return 5167 } 5168 var req *http.Request 5169 var resp *http.Response 5170 if future.PollingURL() != "" { 5171 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5172 if err != nil { 5173 return 5174 } 5175 } else { 5176 req = autorest.ChangeToGet(future.req) 5177 } 5178 resp, err = autorest.SendWithSender(client, req, 5179 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5180 if err != nil { 5181 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure sending request") 5182 return 5183 } 5184 ar, err = client.DeleteResponder(resp) 5185 if err != nil { 5186 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", resp, "Failure responding to request") 5187 } 5188 return 5189} 5190 5191// ConnectionMonitorSource describes the source of connection monitor. 5192type ConnectionMonitorSource struct { 5193 // ResourceID - The ID of the resource used as the source by connection monitor. 5194 ResourceID *string `json:"resourceId,omitempty"` 5195 // Port - The source port used by connection monitor. 5196 Port *int32 `json:"port,omitempty"` 5197} 5198 5199// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running 5200// operation. 5201type ConnectionMonitorsQueryFuture struct { 5202 azure.Future 5203 req *http.Request 5204} 5205 5206// Result returns the result of the asynchronous operation. 5207// If the operation has not completed it will return an error. 5208func (future ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { 5209 var done bool 5210 done, err = future.Done(client) 5211 if err != nil { 5212 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") 5213 return 5214 } 5215 if !done { 5216 return cmqr, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") 5217 } 5218 if future.PollingMethod() == azure.PollingLocation { 5219 cmqr, err = client.QueryResponder(future.Response()) 5220 if err != nil { 5221 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Failure responding to request") 5222 } 5223 return 5224 } 5225 var req *http.Request 5226 var resp *http.Response 5227 if future.PollingURL() != "" { 5228 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5229 if err != nil { 5230 return 5231 } 5232 } else { 5233 req = autorest.ChangeToGet(future.req) 5234 } 5235 resp, err = autorest.SendWithSender(client, req, 5236 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5237 if err != nil { 5238 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure sending request") 5239 return 5240 } 5241 cmqr, err = client.QueryResponder(resp) 5242 if err != nil { 5243 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", resp, "Failure responding to request") 5244 } 5245 return 5246} 5247 5248// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running 5249// operation. 5250type ConnectionMonitorsStartFuture struct { 5251 azure.Future 5252 req *http.Request 5253} 5254 5255// Result returns the result of the asynchronous operation. 5256// If the operation has not completed it will return an error. 5257func (future ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5258 var done bool 5259 done, err = future.Done(client) 5260 if err != nil { 5261 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") 5262 return 5263 } 5264 if !done { 5265 return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") 5266 } 5267 if future.PollingMethod() == azure.PollingLocation { 5268 ar, err = client.StartResponder(future.Response()) 5269 if err != nil { 5270 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Failure responding to request") 5271 } 5272 return 5273 } 5274 var req *http.Request 5275 var resp *http.Response 5276 if future.PollingURL() != "" { 5277 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5278 if err != nil { 5279 return 5280 } 5281 } else { 5282 req = autorest.ChangeToGet(future.req) 5283 } 5284 resp, err = autorest.SendWithSender(client, req, 5285 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5286 if err != nil { 5287 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure sending request") 5288 return 5289 } 5290 ar, err = client.StartResponder(resp) 5291 if err != nil { 5292 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", resp, "Failure responding to request") 5293 } 5294 return 5295} 5296 5297// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running 5298// operation. 5299type ConnectionMonitorsStopFuture struct { 5300 azure.Future 5301 req *http.Request 5302} 5303 5304// Result returns the result of the asynchronous operation. 5305// If the operation has not completed it will return an error. 5306func (future ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { 5307 var done bool 5308 done, err = future.Done(client) 5309 if err != nil { 5310 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") 5311 return 5312 } 5313 if !done { 5314 return ar, azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") 5315 } 5316 if future.PollingMethod() == azure.PollingLocation { 5317 ar, err = client.StopResponder(future.Response()) 5318 if err != nil { 5319 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Failure responding to request") 5320 } 5321 return 5322 } 5323 var req *http.Request 5324 var resp *http.Response 5325 if future.PollingURL() != "" { 5326 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5327 if err != nil { 5328 return 5329 } 5330 } else { 5331 req = autorest.ChangeToGet(future.req) 5332 } 5333 resp, err = autorest.SendWithSender(client, req, 5334 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5335 if err != nil { 5336 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure sending request") 5337 return 5338 } 5339 ar, err = client.StopResponder(resp) 5340 if err != nil { 5341 err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", resp, "Failure responding to request") 5342 } 5343 return 5344} 5345 5346// ConnectionResetSharedKey the virtual network connection reset shared key 5347type ConnectionResetSharedKey struct { 5348 autorest.Response `json:"-"` 5349 // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. 5350 KeyLength *int32 `json:"keyLength,omitempty"` 5351} 5352 5353// ConnectionSharedKey response for GetConnectionSharedKey API service call 5354type ConnectionSharedKey struct { 5355 autorest.Response `json:"-"` 5356 // Value - The virtual network connection shared key value. 5357 Value *string `json:"value,omitempty"` 5358} 5359 5360// ConnectionStateSnapshot connection state snapshot. 5361type ConnectionStateSnapshot struct { 5362 // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' 5363 ConnectionState ConnectionState `json:"connectionState,omitempty"` 5364 // StartTime - The start time of the connection snapshot. 5365 StartTime *date.Time `json:"startTime,omitempty"` 5366 // EndTime - The end time of the connection snapshot. 5367 EndTime *date.Time `json:"endTime,omitempty"` 5368 // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' 5369 EvaluationState EvaluationState `json:"evaluationState,omitempty"` 5370 // Hops - List of hops between the source and the destination. 5371 Hops *[]ConnectivityHop `json:"hops,omitempty"` 5372} 5373 5374// ConnectivityDestination parameters that define destination of connection. 5375type ConnectivityDestination struct { 5376 // ResourceID - The ID of the resource to which a connection attempt will be made. 5377 ResourceID *string `json:"resourceId,omitempty"` 5378 // Address - The IP address or URI the resource to which a connection attempt will be made. 5379 Address *string `json:"address,omitempty"` 5380 // Port - Port on which check connectivity will be performed. 5381 Port *int32 `json:"port,omitempty"` 5382} 5383 5384// ConnectivityHop information about a hop between the source and the destination. 5385type ConnectivityHop struct { 5386 // Type - The type of the hop. 5387 Type *string `json:"type,omitempty"` 5388 // ID - The ID of the hop. 5389 ID *string `json:"id,omitempty"` 5390 // Address - The IP address of the hop. 5391 Address *string `json:"address,omitempty"` 5392 // ResourceID - The ID of the resource corresponding to this hop. 5393 ResourceID *string `json:"resourceId,omitempty"` 5394 // NextHopIds - List of next hop identifiers. 5395 NextHopIds *[]string `json:"nextHopIds,omitempty"` 5396 // Issues - List of issues. 5397 Issues *[]ConnectivityIssue `json:"issues,omitempty"` 5398} 5399 5400// ConnectivityInformation information on the connectivity status. 5401type ConnectivityInformation struct { 5402 autorest.Response `json:"-"` 5403 // Hops - List of hops between the source and the destination. 5404 Hops *[]ConnectivityHop `json:"hops,omitempty"` 5405 // ConnectionStatus - The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' 5406 ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` 5407 // AvgLatencyInMs - Average latency in milliseconds. 5408 AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` 5409 // MinLatencyInMs - Minimum latency in milliseconds. 5410 MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` 5411 // MaxLatencyInMs - Maximum latency in milliseconds. 5412 MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` 5413 // ProbesSent - Total number of probes sent. 5414 ProbesSent *int32 `json:"probesSent,omitempty"` 5415 // ProbesFailed - Number of failed probes. 5416 ProbesFailed *int32 `json:"probesFailed,omitempty"` 5417} 5418 5419// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. 5420type ConnectivityIssue struct { 5421 // Origin - The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' 5422 Origin Origin `json:"origin,omitempty"` 5423 // Severity - The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' 5424 Severity Severity `json:"severity,omitempty"` 5425 // Type - The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' 5426 Type IssueType `json:"type,omitempty"` 5427 // Context - Provides additional context on the issue. 5428 Context *[]map[string]*string `json:"context,omitempty"` 5429} 5430 5431// ConnectivityParameters parameters that determine how the connectivity check will be performed. 5432type ConnectivityParameters struct { 5433 Source *ConnectivitySource `json:"source,omitempty"` 5434 Destination *ConnectivityDestination `json:"destination,omitempty"` 5435 // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' 5436 Protocol Protocol `json:"protocol,omitempty"` 5437 ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` 5438} 5439 5440// ConnectivitySource parameters that define the source of the connection. 5441type ConnectivitySource struct { 5442 // ResourceID - The ID of the resource from which a connectivity check will be initiated. 5443 ResourceID *string `json:"resourceId,omitempty"` 5444 // Port - The source port from which a connectivity check will be performed. 5445 Port *int32 `json:"port,omitempty"` 5446} 5447 5448// DdosProtectionPlan a DDoS protection plan in a resource group. 5449type DdosProtectionPlan struct { 5450 autorest.Response `json:"-"` 5451 // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. 5452 *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` 5453 // Etag - A unique read-only string that changes whenever the resource is updated. 5454 Etag *string `json:"etag,omitempty"` 5455 // ID - Resource ID. 5456 ID *string `json:"id,omitempty"` 5457 // Name - Resource name. 5458 Name *string `json:"name,omitempty"` 5459 // Type - Resource type. 5460 Type *string `json:"type,omitempty"` 5461 // Location - Resource location. 5462 Location *string `json:"location,omitempty"` 5463 // Tags - Resource tags. 5464 Tags map[string]*string `json:"tags"` 5465} 5466 5467// MarshalJSON is the custom marshaler for DdosProtectionPlan. 5468func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { 5469 objectMap := make(map[string]interface{}) 5470 if dpp.DdosProtectionPlanPropertiesFormat != nil { 5471 objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat 5472 } 5473 if dpp.Etag != nil { 5474 objectMap["etag"] = dpp.Etag 5475 } 5476 if dpp.ID != nil { 5477 objectMap["id"] = dpp.ID 5478 } 5479 if dpp.Name != nil { 5480 objectMap["name"] = dpp.Name 5481 } 5482 if dpp.Type != nil { 5483 objectMap["type"] = dpp.Type 5484 } 5485 if dpp.Location != nil { 5486 objectMap["location"] = dpp.Location 5487 } 5488 if dpp.Tags != nil { 5489 objectMap["tags"] = dpp.Tags 5490 } 5491 return json.Marshal(objectMap) 5492} 5493 5494// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. 5495func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { 5496 var m map[string]*json.RawMessage 5497 err := json.Unmarshal(body, &m) 5498 if err != nil { 5499 return err 5500 } 5501 for k, v := range m { 5502 switch k { 5503 case "properties": 5504 if v != nil { 5505 var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat 5506 err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) 5507 if err != nil { 5508 return err 5509 } 5510 dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat 5511 } 5512 case "etag": 5513 if v != nil { 5514 var etag string 5515 err = json.Unmarshal(*v, &etag) 5516 if err != nil { 5517 return err 5518 } 5519 dpp.Etag = &etag 5520 } 5521 case "id": 5522 if v != nil { 5523 var ID string 5524 err = json.Unmarshal(*v, &ID) 5525 if err != nil { 5526 return err 5527 } 5528 dpp.ID = &ID 5529 } 5530 case "name": 5531 if v != nil { 5532 var name string 5533 err = json.Unmarshal(*v, &name) 5534 if err != nil { 5535 return err 5536 } 5537 dpp.Name = &name 5538 } 5539 case "type": 5540 if v != nil { 5541 var typeVar string 5542 err = json.Unmarshal(*v, &typeVar) 5543 if err != nil { 5544 return err 5545 } 5546 dpp.Type = &typeVar 5547 } 5548 case "location": 5549 if v != nil { 5550 var location string 5551 err = json.Unmarshal(*v, &location) 5552 if err != nil { 5553 return err 5554 } 5555 dpp.Location = &location 5556 } 5557 case "tags": 5558 if v != nil { 5559 var tags map[string]*string 5560 err = json.Unmarshal(*v, &tags) 5561 if err != nil { 5562 return err 5563 } 5564 dpp.Tags = tags 5565 } 5566 } 5567 } 5568 5569 return nil 5570} 5571 5572// DdosProtectionPlanListResult a list of DDoS protection plans. 5573type DdosProtectionPlanListResult struct { 5574 autorest.Response `json:"-"` 5575 // Value - A list of DDoS protection plans. 5576 Value *[]DdosProtectionPlan `json:"value,omitempty"` 5577 // NextLink - The URL to get the next set of results. 5578 NextLink *string `json:"nextLink,omitempty"` 5579} 5580 5581// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. 5582type DdosProtectionPlanListResultIterator struct { 5583 i int 5584 page DdosProtectionPlanListResultPage 5585} 5586 5587// Next advances to the next value. If there was an error making 5588// the request the iterator does not advance and the error is returned. 5589func (iter *DdosProtectionPlanListResultIterator) Next() error { 5590 iter.i++ 5591 if iter.i < len(iter.page.Values()) { 5592 return nil 5593 } 5594 err := iter.page.Next() 5595 if err != nil { 5596 iter.i-- 5597 return err 5598 } 5599 iter.i = 0 5600 return nil 5601} 5602 5603// NotDone returns true if the enumeration should be started or is not yet complete. 5604func (iter DdosProtectionPlanListResultIterator) NotDone() bool { 5605 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5606} 5607 5608// Response returns the raw server response from the last page request. 5609func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { 5610 return iter.page.Response() 5611} 5612 5613// Value returns the current value or a zero-initialized value if the 5614// iterator has advanced beyond the end of the collection. 5615func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { 5616 if !iter.page.NotDone() { 5617 return DdosProtectionPlan{} 5618 } 5619 return iter.page.Values()[iter.i] 5620} 5621 5622// IsEmpty returns true if the ListResult contains no values. 5623func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { 5624 return dpplr.Value == nil || len(*dpplr.Value) == 0 5625} 5626 5627// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. 5628// It returns nil if no more results exist. 5629func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer() (*http.Request, error) { 5630 if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { 5631 return nil, nil 5632 } 5633 return autorest.Prepare(&http.Request{}, 5634 autorest.AsJSON(), 5635 autorest.AsGet(), 5636 autorest.WithBaseURL(to.String(dpplr.NextLink))) 5637} 5638 5639// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. 5640type DdosProtectionPlanListResultPage struct { 5641 fn func(DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) 5642 dpplr DdosProtectionPlanListResult 5643} 5644 5645// Next advances to the next page of values. If there was an error making 5646// the request the page does not advance and the error is returned. 5647func (page *DdosProtectionPlanListResultPage) Next() error { 5648 next, err := page.fn(page.dpplr) 5649 if err != nil { 5650 return err 5651 } 5652 page.dpplr = next 5653 return nil 5654} 5655 5656// NotDone returns true if the page enumeration should be started or is not yet complete. 5657func (page DdosProtectionPlanListResultPage) NotDone() bool { 5658 return !page.dpplr.IsEmpty() 5659} 5660 5661// Response returns the raw server response from the last page request. 5662func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { 5663 return page.dpplr 5664} 5665 5666// Values returns the slice of values for the current page or nil if there are no values. 5667func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { 5668 if page.dpplr.IsEmpty() { 5669 return nil 5670 } 5671 return *page.dpplr.Value 5672} 5673 5674// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. 5675type DdosProtectionPlanPropertiesFormat struct { 5676 // ResourceGUID - The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. 5677 ResourceGUID *string `json:"resourceGuid,omitempty"` 5678 // ProvisioningState - The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. 5679 ProvisioningState *string `json:"provisioningState,omitempty"` 5680 // VirtualNetworks - The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. 5681 VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` 5682} 5683 5684// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 5685// long-running operation. 5686type DdosProtectionPlansCreateOrUpdateFuture struct { 5687 azure.Future 5688 req *http.Request 5689} 5690 5691// Result returns the result of the asynchronous operation. 5692// If the operation has not completed it will return an error. 5693func (future DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { 5694 var done bool 5695 done, err = future.Done(client) 5696 if err != nil { 5697 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 5698 return 5699 } 5700 if !done { 5701 return dpp, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") 5702 } 5703 if future.PollingMethod() == azure.PollingLocation { 5704 dpp, err = client.CreateOrUpdateResponder(future.Response()) 5705 if err != nil { 5706 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 5707 } 5708 return 5709 } 5710 var req *http.Request 5711 var resp *http.Response 5712 if future.PollingURL() != "" { 5713 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5714 if err != nil { 5715 return 5716 } 5717 } else { 5718 req = autorest.ChangeToGet(future.req) 5719 } 5720 resp, err = autorest.SendWithSender(client, req, 5721 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5722 if err != nil { 5723 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure sending request") 5724 return 5725 } 5726 dpp, err = client.CreateOrUpdateResponder(resp) 5727 if err != nil { 5728 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 5729 } 5730 return 5731} 5732 5733// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 5734// operation. 5735type DdosProtectionPlansDeleteFuture struct { 5736 azure.Future 5737 req *http.Request 5738} 5739 5740// Result returns the result of the asynchronous operation. 5741// If the operation has not completed it will return an error. 5742func (future DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { 5743 var done bool 5744 done, err = future.Done(client) 5745 if err != nil { 5746 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") 5747 return 5748 } 5749 if !done { 5750 return ar, azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") 5751 } 5752 if future.PollingMethod() == azure.PollingLocation { 5753 ar, err = client.DeleteResponder(future.Response()) 5754 if err != nil { 5755 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Failure responding to request") 5756 } 5757 return 5758 } 5759 var req *http.Request 5760 var resp *http.Response 5761 if future.PollingURL() != "" { 5762 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 5763 if err != nil { 5764 return 5765 } 5766 } else { 5767 req = autorest.ChangeToGet(future.req) 5768 } 5769 resp, err = autorest.SendWithSender(client, req, 5770 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 5771 if err != nil { 5772 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure sending request") 5773 return 5774 } 5775 ar, err = client.DeleteResponder(resp) 5776 if err != nil { 5777 err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", resp, "Failure responding to request") 5778 } 5779 return 5780} 5781 5782// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. 5783// Standard DHCP option for a subnet overrides VNET DHCP options. 5784type DhcpOptions struct { 5785 // DNSServers - The list of DNS servers IP addresses. 5786 DNSServers *[]string `json:"dnsServers,omitempty"` 5787} 5788 5789// Dimension dimension of the metric. 5790type Dimension struct { 5791 // Name - The name of the dimension. 5792 Name *string `json:"name,omitempty"` 5793 // DisplayName - The display name of the dimension. 5794 DisplayName *string `json:"displayName,omitempty"` 5795 // InternalName - The internal name of the dimension. 5796 InternalName *string `json:"internalName,omitempty"` 5797} 5798 5799// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. 5800type DNSNameAvailabilityResult struct { 5801 autorest.Response `json:"-"` 5802 // Available - Domain availability (True/False). 5803 Available *bool `json:"available,omitempty"` 5804} 5805 5806// EffectiveNetworkSecurityGroup effective network security group. 5807type EffectiveNetworkSecurityGroup struct { 5808 // NetworkSecurityGroup - The ID of network security group that is applied. 5809 NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` 5810 // Association - Associated resources. 5811 Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` 5812 // EffectiveSecurityRules - A collection of effective security rules. 5813 EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` 5814 // TagMap - Mapping of tags to list of IP Addresses included within the tag. 5815 TagMap map[string][]string `json:"tagMap"` 5816} 5817 5818// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. 5819func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { 5820 objectMap := make(map[string]interface{}) 5821 if ensg.NetworkSecurityGroup != nil { 5822 objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup 5823 } 5824 if ensg.Association != nil { 5825 objectMap["association"] = ensg.Association 5826 } 5827 if ensg.EffectiveSecurityRules != nil { 5828 objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules 5829 } 5830 if ensg.TagMap != nil { 5831 objectMap["tagMap"] = ensg.TagMap 5832 } 5833 return json.Marshal(objectMap) 5834} 5835 5836// EffectiveNetworkSecurityGroupAssociation the effective network security group association. 5837type EffectiveNetworkSecurityGroupAssociation struct { 5838 // Subnet - The ID of the subnet if assigned. 5839 Subnet *SubResource `json:"subnet,omitempty"` 5840 // NetworkInterface - The ID of the network interface if assigned. 5841 NetworkInterface *SubResource `json:"networkInterface,omitempty"` 5842} 5843 5844// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service call. 5845type EffectiveNetworkSecurityGroupListResult struct { 5846 autorest.Response `json:"-"` 5847 // Value - A list of effective network security groups. 5848 Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` 5849 // NextLink - The URL to get the next set of results. 5850 NextLink *string `json:"nextLink,omitempty"` 5851} 5852 5853// EffectiveNetworkSecurityRule effective network security rules. 5854type EffectiveNetworkSecurityRule struct { 5855 // Name - The name of the security rule specified by the user (if created by the user). 5856 Name *string `json:"name,omitempty"` 5857 // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All' 5858 Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` 5859 // SourcePortRange - The source port or range. 5860 SourcePortRange *string `json:"sourcePortRange,omitempty"` 5861 // DestinationPortRange - The destination port or range. 5862 DestinationPortRange *string `json:"destinationPortRange,omitempty"` 5863 // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) 5864 SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` 5865 // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as seperator (e.g. 100-400), or an asterix (*) 5866 DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` 5867 // SourceAddressPrefix - The source address prefix. 5868 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 5869 // DestinationAddressPrefix - The destination address prefix. 5870 DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` 5871 // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). 5872 SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` 5873 // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). 5874 DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` 5875 // ExpandedSourceAddressPrefix - The expanded source address prefix. 5876 ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` 5877 // ExpandedDestinationAddressPrefix - Expanded destination address prefix. 5878 ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` 5879 // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' 5880 Access SecurityRuleAccess `json:"access,omitempty"` 5881 // Priority - The priority of the rule. 5882 Priority *int32 `json:"priority,omitempty"` 5883 // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' 5884 Direction SecurityRuleDirection `json:"direction,omitempty"` 5885} 5886 5887// EffectiveRoute effective Route 5888type EffectiveRoute struct { 5889 // Name - The name of the user defined route. This is optional. 5890 Name *string `json:"name,omitempty"` 5891 // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' 5892 Source EffectiveRouteSource `json:"source,omitempty"` 5893 // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid' 5894 State EffectiveRouteState `json:"state,omitempty"` 5895 // AddressPrefix - The address prefixes of the effective routes in CIDR notation. 5896 AddressPrefix *[]string `json:"addressPrefix,omitempty"` 5897 // NextHopIPAddress - The IP address of the next hop of the effective route. 5898 NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` 5899 // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' 5900 NextHopType RouteNextHopType `json:"nextHopType,omitempty"` 5901} 5902 5903// EffectiveRouteListResult response for list effective route API service call. 5904type EffectiveRouteListResult struct { 5905 autorest.Response `json:"-"` 5906 // Value - A list of effective routes. 5907 Value *[]EffectiveRoute `json:"value,omitempty"` 5908 // NextLink - The URL to get the next set of results. 5909 NextLink *string `json:"nextLink,omitempty"` 5910} 5911 5912// EndpointServiceResult endpoint service. 5913type EndpointServiceResult struct { 5914 // Name - Name of the endpoint service. 5915 Name *string `json:"name,omitempty"` 5916 // Type - Type of the endpoint service. 5917 Type *string `json:"type,omitempty"` 5918 // ID - Resource ID. 5919 ID *string `json:"id,omitempty"` 5920} 5921 5922// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. 5923type EndpointServicesListResult struct { 5924 autorest.Response `json:"-"` 5925 // Value - List of available endpoint services in a region. 5926 Value *[]EndpointServiceResult `json:"value,omitempty"` 5927 // NextLink - The URL to get the next set of results. 5928 NextLink *string `json:"nextLink,omitempty"` 5929} 5930 5931// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values. 5932type EndpointServicesListResultIterator struct { 5933 i int 5934 page EndpointServicesListResultPage 5935} 5936 5937// Next advances to the next value. If there was an error making 5938// the request the iterator does not advance and the error is returned. 5939func (iter *EndpointServicesListResultIterator) Next() error { 5940 iter.i++ 5941 if iter.i < len(iter.page.Values()) { 5942 return nil 5943 } 5944 err := iter.page.Next() 5945 if err != nil { 5946 iter.i-- 5947 return err 5948 } 5949 iter.i = 0 5950 return nil 5951} 5952 5953// NotDone returns true if the enumeration should be started or is not yet complete. 5954func (iter EndpointServicesListResultIterator) NotDone() bool { 5955 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5956} 5957 5958// Response returns the raw server response from the last page request. 5959func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { 5960 return iter.page.Response() 5961} 5962 5963// Value returns the current value or a zero-initialized value if the 5964// iterator has advanced beyond the end of the collection. 5965func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { 5966 if !iter.page.NotDone() { 5967 return EndpointServiceResult{} 5968 } 5969 return iter.page.Values()[iter.i] 5970} 5971 5972// IsEmpty returns true if the ListResult contains no values. 5973func (eslr EndpointServicesListResult) IsEmpty() bool { 5974 return eslr.Value == nil || len(*eslr.Value) == 0 5975} 5976 5977// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. 5978// It returns nil if no more results exist. 5979func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*http.Request, error) { 5980 if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { 5981 return nil, nil 5982 } 5983 return autorest.Prepare(&http.Request{}, 5984 autorest.AsJSON(), 5985 autorest.AsGet(), 5986 autorest.WithBaseURL(to.String(eslr.NextLink))) 5987} 5988 5989// EndpointServicesListResultPage contains a page of EndpointServiceResult values. 5990type EndpointServicesListResultPage struct { 5991 fn func(EndpointServicesListResult) (EndpointServicesListResult, error) 5992 eslr EndpointServicesListResult 5993} 5994 5995// Next advances to the next page of values. If there was an error making 5996// the request the page does not advance and the error is returned. 5997func (page *EndpointServicesListResultPage) Next() error { 5998 next, err := page.fn(page.eslr) 5999 if err != nil { 6000 return err 6001 } 6002 page.eslr = next 6003 return nil 6004} 6005 6006// NotDone returns true if the page enumeration should be started or is not yet complete. 6007func (page EndpointServicesListResultPage) NotDone() bool { 6008 return !page.eslr.IsEmpty() 6009} 6010 6011// Response returns the raw server response from the last page request. 6012func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { 6013 return page.eslr 6014} 6015 6016// Values returns the slice of values for the current page or nil if there are no values. 6017func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { 6018 if page.eslr.IsEmpty() { 6019 return nil 6020 } 6021 return *page.eslr.Value 6022} 6023 6024// Error ... 6025type Error struct { 6026 Code *string `json:"code,omitempty"` 6027 Message *string `json:"message,omitempty"` 6028 Target *string `json:"target,omitempty"` 6029 Details *[]ErrorDetails `json:"details,omitempty"` 6030 InnerError *string `json:"innerError,omitempty"` 6031} 6032 6033// ErrorDetails ... 6034type ErrorDetails struct { 6035 Code *string `json:"code,omitempty"` 6036 Target *string `json:"target,omitempty"` 6037 Message *string `json:"message,omitempty"` 6038} 6039 6040// ExpressRouteCircuit expressRouteCircuit resource 6041type ExpressRouteCircuit struct { 6042 autorest.Response `json:"-"` 6043 // Sku - The SKU. 6044 Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` 6045 *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` 6046 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 6047 Etag *string `json:"etag,omitempty"` 6048 // ID - Resource ID. 6049 ID *string `json:"id,omitempty"` 6050 // Name - Resource name. 6051 Name *string `json:"name,omitempty"` 6052 // Type - Resource type. 6053 Type *string `json:"type,omitempty"` 6054 // Location - Resource location. 6055 Location *string `json:"location,omitempty"` 6056 // Tags - Resource tags. 6057 Tags map[string]*string `json:"tags"` 6058} 6059 6060// MarshalJSON is the custom marshaler for ExpressRouteCircuit. 6061func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { 6062 objectMap := make(map[string]interface{}) 6063 if erc.Sku != nil { 6064 objectMap["sku"] = erc.Sku 6065 } 6066 if erc.ExpressRouteCircuitPropertiesFormat != nil { 6067 objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat 6068 } 6069 if erc.Etag != nil { 6070 objectMap["etag"] = erc.Etag 6071 } 6072 if erc.ID != nil { 6073 objectMap["id"] = erc.ID 6074 } 6075 if erc.Name != nil { 6076 objectMap["name"] = erc.Name 6077 } 6078 if erc.Type != nil { 6079 objectMap["type"] = erc.Type 6080 } 6081 if erc.Location != nil { 6082 objectMap["location"] = erc.Location 6083 } 6084 if erc.Tags != nil { 6085 objectMap["tags"] = erc.Tags 6086 } 6087 return json.Marshal(objectMap) 6088} 6089 6090// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. 6091func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { 6092 var m map[string]*json.RawMessage 6093 err := json.Unmarshal(body, &m) 6094 if err != nil { 6095 return err 6096 } 6097 for k, v := range m { 6098 switch k { 6099 case "sku": 6100 if v != nil { 6101 var sku ExpressRouteCircuitSku 6102 err = json.Unmarshal(*v, &sku) 6103 if err != nil { 6104 return err 6105 } 6106 erc.Sku = &sku 6107 } 6108 case "properties": 6109 if v != nil { 6110 var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat 6111 err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) 6112 if err != nil { 6113 return err 6114 } 6115 erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat 6116 } 6117 case "etag": 6118 if v != nil { 6119 var etag string 6120 err = json.Unmarshal(*v, &etag) 6121 if err != nil { 6122 return err 6123 } 6124 erc.Etag = &etag 6125 } 6126 case "id": 6127 if v != nil { 6128 var ID string 6129 err = json.Unmarshal(*v, &ID) 6130 if err != nil { 6131 return err 6132 } 6133 erc.ID = &ID 6134 } 6135 case "name": 6136 if v != nil { 6137 var name string 6138 err = json.Unmarshal(*v, &name) 6139 if err != nil { 6140 return err 6141 } 6142 erc.Name = &name 6143 } 6144 case "type": 6145 if v != nil { 6146 var typeVar string 6147 err = json.Unmarshal(*v, &typeVar) 6148 if err != nil { 6149 return err 6150 } 6151 erc.Type = &typeVar 6152 } 6153 case "location": 6154 if v != nil { 6155 var location string 6156 err = json.Unmarshal(*v, &location) 6157 if err != nil { 6158 return err 6159 } 6160 erc.Location = &location 6161 } 6162 case "tags": 6163 if v != nil { 6164 var tags map[string]*string 6165 err = json.Unmarshal(*v, &tags) 6166 if err != nil { 6167 return err 6168 } 6169 erc.Tags = tags 6170 } 6171 } 6172 } 6173 6174 return nil 6175} 6176 6177// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. 6178type ExpressRouteCircuitArpTable struct { 6179 // Age - Age 6180 Age *int32 `json:"age,omitempty"` 6181 // Interface - Interface 6182 Interface *string `json:"interface,omitempty"` 6183 // IPAddress - The IP address. 6184 IPAddress *string `json:"ipAddress,omitempty"` 6185 // MacAddress - The MAC address. 6186 MacAddress *string `json:"macAddress,omitempty"` 6187} 6188 6189// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. 6190type ExpressRouteCircuitAuthorization struct { 6191 autorest.Response `json:"-"` 6192 *AuthorizationPropertiesFormat `json:"properties,omitempty"` 6193 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 6194 Name *string `json:"name,omitempty"` 6195 // Etag - A unique read-only string that changes whenever the resource is updated. 6196 Etag *string `json:"etag,omitempty"` 6197 // ID - Resource ID. 6198 ID *string `json:"id,omitempty"` 6199} 6200 6201// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. 6202func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { 6203 objectMap := make(map[string]interface{}) 6204 if erca.AuthorizationPropertiesFormat != nil { 6205 objectMap["properties"] = erca.AuthorizationPropertiesFormat 6206 } 6207 if erca.Name != nil { 6208 objectMap["name"] = erca.Name 6209 } 6210 if erca.Etag != nil { 6211 objectMap["etag"] = erca.Etag 6212 } 6213 if erca.ID != nil { 6214 objectMap["id"] = erca.ID 6215 } 6216 return json.Marshal(objectMap) 6217} 6218 6219// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. 6220func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { 6221 var m map[string]*json.RawMessage 6222 err := json.Unmarshal(body, &m) 6223 if err != nil { 6224 return err 6225 } 6226 for k, v := range m { 6227 switch k { 6228 case "properties": 6229 if v != nil { 6230 var authorizationPropertiesFormat AuthorizationPropertiesFormat 6231 err = json.Unmarshal(*v, &authorizationPropertiesFormat) 6232 if err != nil { 6233 return err 6234 } 6235 erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat 6236 } 6237 case "name": 6238 if v != nil { 6239 var name string 6240 err = json.Unmarshal(*v, &name) 6241 if err != nil { 6242 return err 6243 } 6244 erca.Name = &name 6245 } 6246 case "etag": 6247 if v != nil { 6248 var etag string 6249 err = json.Unmarshal(*v, &etag) 6250 if err != nil { 6251 return err 6252 } 6253 erca.Etag = &etag 6254 } 6255 case "id": 6256 if v != nil { 6257 var ID string 6258 err = json.Unmarshal(*v, &ID) 6259 if err != nil { 6260 return err 6261 } 6262 erca.ID = &ID 6263 } 6264 } 6265 } 6266 6267 return nil 6268} 6269 6270// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 6271// of a long-running operation. 6272type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { 6273 azure.Future 6274 req *http.Request 6275} 6276 6277// Result returns the result of the asynchronous operation. 6278// If the operation has not completed it will return an error. 6279func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { 6280 var done bool 6281 done, err = future.Done(client) 6282 if err != nil { 6283 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6284 return 6285 } 6286 if !done { 6287 return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") 6288 } 6289 if future.PollingMethod() == azure.PollingLocation { 6290 erca, err = client.CreateOrUpdateResponder(future.Response()) 6291 if err != nil { 6292 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 6293 } 6294 return 6295 } 6296 var req *http.Request 6297 var resp *http.Response 6298 if future.PollingURL() != "" { 6299 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6300 if err != nil { 6301 return 6302 } 6303 } else { 6304 req = autorest.ChangeToGet(future.req) 6305 } 6306 resp, err = autorest.SendWithSender(client, req, 6307 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6308 if err != nil { 6309 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 6310 return 6311 } 6312 erca, err = client.CreateOrUpdateResponder(resp) 6313 if err != nil { 6314 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 6315 } 6316 return 6317} 6318 6319// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a 6320// long-running operation. 6321type ExpressRouteCircuitAuthorizationsDeleteFuture struct { 6322 azure.Future 6323 req *http.Request 6324} 6325 6326// Result returns the result of the asynchronous operation. 6327// If the operation has not completed it will return an error. 6328func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { 6329 var done bool 6330 done, err = future.Done(client) 6331 if err != nil { 6332 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") 6333 return 6334 } 6335 if !done { 6336 return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") 6337 } 6338 if future.PollingMethod() == azure.PollingLocation { 6339 ar, err = client.DeleteResponder(future.Response()) 6340 if err != nil { 6341 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request") 6342 } 6343 return 6344 } 6345 var req *http.Request 6346 var resp *http.Response 6347 if future.PollingURL() != "" { 6348 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6349 if err != nil { 6350 return 6351 } 6352 } else { 6353 req = autorest.ChangeToGet(future.req) 6354 } 6355 resp, err = autorest.SendWithSender(client, req, 6356 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6357 if err != nil { 6358 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request") 6359 return 6360 } 6361 ar, err = client.DeleteResponder(resp) 6362 if err != nil { 6363 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request") 6364 } 6365 return 6366} 6367 6368// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource. 6369type ExpressRouteCircuitConnection struct { 6370 autorest.Response `json:"-"` 6371 *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` 6372 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 6373 Name *string `json:"name,omitempty"` 6374 // Etag - A unique read-only string that changes whenever the resource is updated. 6375 Etag *string `json:"etag,omitempty"` 6376 // ID - Resource ID. 6377 ID *string `json:"id,omitempty"` 6378} 6379 6380// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. 6381func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { 6382 objectMap := make(map[string]interface{}) 6383 if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { 6384 objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat 6385 } 6386 if ercc.Name != nil { 6387 objectMap["name"] = ercc.Name 6388 } 6389 if ercc.Etag != nil { 6390 objectMap["etag"] = ercc.Etag 6391 } 6392 if ercc.ID != nil { 6393 objectMap["id"] = ercc.ID 6394 } 6395 return json.Marshal(objectMap) 6396} 6397 6398// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. 6399func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { 6400 var m map[string]*json.RawMessage 6401 err := json.Unmarshal(body, &m) 6402 if err != nil { 6403 return err 6404 } 6405 for k, v := range m { 6406 switch k { 6407 case "properties": 6408 if v != nil { 6409 var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat 6410 err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) 6411 if err != nil { 6412 return err 6413 } 6414 ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat 6415 } 6416 case "name": 6417 if v != nil { 6418 var name string 6419 err = json.Unmarshal(*v, &name) 6420 if err != nil { 6421 return err 6422 } 6423 ercc.Name = &name 6424 } 6425 case "etag": 6426 if v != nil { 6427 var etag string 6428 err = json.Unmarshal(*v, &etag) 6429 if err != nil { 6430 return err 6431 } 6432 ercc.Etag = &etag 6433 } 6434 case "id": 6435 if v != nil { 6436 var ID string 6437 err = json.Unmarshal(*v, &ID) 6438 if err != nil { 6439 return err 6440 } 6441 ercc.ID = &ID 6442 } 6443 } 6444 } 6445 6446 return nil 6447} 6448 6449// ExpressRouteCircuitConnectionPropertiesFormat ... 6450type ExpressRouteCircuitConnectionPropertiesFormat struct { 6451 // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. 6452 ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` 6453 // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. 6454 PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` 6455 // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. 6456 AddressPrefix *string `json:"addressPrefix,omitempty"` 6457 // AuthorizationKey - The authorization key. 6458 AuthorizationKey *string `json:"authorizationKey,omitempty"` 6459 // CircuitConnectionStatus - Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected' 6460 CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` 6461 // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. 6462 ProvisioningState *string `json:"provisioningState,omitempty"` 6463} 6464 6465// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 6466// long-running operation. 6467type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { 6468 azure.Future 6469 req *http.Request 6470} 6471 6472// Result returns the result of the asynchronous operation. 6473// If the operation has not completed it will return an error. 6474func (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { 6475 var done bool 6476 done, err = future.Done(client) 6477 if err != nil { 6478 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6479 return 6480 } 6481 if !done { 6482 return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") 6483 } 6484 if future.PollingMethod() == azure.PollingLocation { 6485 ercc, err = client.CreateOrUpdateResponder(future.Response()) 6486 if err != nil { 6487 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 6488 } 6489 return 6490 } 6491 var req *http.Request 6492 var resp *http.Response 6493 if future.PollingURL() != "" { 6494 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6495 if err != nil { 6496 return 6497 } 6498 } else { 6499 req = autorest.ChangeToGet(future.req) 6500 } 6501 resp, err = autorest.SendWithSender(client, req, 6502 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6503 if err != nil { 6504 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 6505 return 6506 } 6507 ercc, err = client.CreateOrUpdateResponder(resp) 6508 if err != nil { 6509 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 6510 } 6511 return 6512} 6513 6514// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a 6515// long-running operation. 6516type ExpressRouteCircuitConnectionsDeleteFuture struct { 6517 azure.Future 6518 req *http.Request 6519} 6520 6521// Result returns the result of the asynchronous operation. 6522// If the operation has not completed it will return an error. 6523func (future ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { 6524 var done bool 6525 done, err = future.Done(client) 6526 if err != nil { 6527 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") 6528 return 6529 } 6530 if !done { 6531 return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") 6532 } 6533 if future.PollingMethod() == azure.PollingLocation { 6534 ar, err = client.DeleteResponder(future.Response()) 6535 if err != nil { 6536 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request") 6537 } 6538 return 6539 } 6540 var req *http.Request 6541 var resp *http.Response 6542 if future.PollingURL() != "" { 6543 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6544 if err != nil { 6545 return 6546 } 6547 } else { 6548 req = autorest.ChangeToGet(future.req) 6549 } 6550 resp, err = autorest.SendWithSender(client, req, 6551 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6552 if err != nil { 6553 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure sending request") 6554 return 6555 } 6556 ar, err = client.DeleteResponder(resp) 6557 if err != nil { 6558 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", resp, "Failure responding to request") 6559 } 6560 return 6561} 6562 6563// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. 6564type ExpressRouteCircuitListResult struct { 6565 autorest.Response `json:"-"` 6566 // Value - A list of ExpressRouteCircuits in a resource group. 6567 Value *[]ExpressRouteCircuit `json:"value,omitempty"` 6568 // NextLink - The URL to get the next set of results. 6569 NextLink *string `json:"nextLink,omitempty"` 6570} 6571 6572// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values. 6573type ExpressRouteCircuitListResultIterator struct { 6574 i int 6575 page ExpressRouteCircuitListResultPage 6576} 6577 6578// Next advances to the next value. If there was an error making 6579// the request the iterator does not advance and the error is returned. 6580func (iter *ExpressRouteCircuitListResultIterator) Next() error { 6581 iter.i++ 6582 if iter.i < len(iter.page.Values()) { 6583 return nil 6584 } 6585 err := iter.page.Next() 6586 if err != nil { 6587 iter.i-- 6588 return err 6589 } 6590 iter.i = 0 6591 return nil 6592} 6593 6594// NotDone returns true if the enumeration should be started or is not yet complete. 6595func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { 6596 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6597} 6598 6599// Response returns the raw server response from the last page request. 6600func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { 6601 return iter.page.Response() 6602} 6603 6604// Value returns the current value or a zero-initialized value if the 6605// iterator has advanced beyond the end of the collection. 6606func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { 6607 if !iter.page.NotDone() { 6608 return ExpressRouteCircuit{} 6609 } 6610 return iter.page.Values()[iter.i] 6611} 6612 6613// IsEmpty returns true if the ListResult contains no values. 6614func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { 6615 return erclr.Value == nil || len(*erclr.Value) == 0 6616} 6617 6618// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. 6619// It returns nil if no more results exist. 6620func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) { 6621 if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { 6622 return nil, nil 6623 } 6624 return autorest.Prepare(&http.Request{}, 6625 autorest.AsJSON(), 6626 autorest.AsGet(), 6627 autorest.WithBaseURL(to.String(erclr.NextLink))) 6628} 6629 6630// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. 6631type ExpressRouteCircuitListResultPage struct { 6632 fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) 6633 erclr ExpressRouteCircuitListResult 6634} 6635 6636// Next advances to the next page of values. If there was an error making 6637// the request the page does not advance and the error is returned. 6638func (page *ExpressRouteCircuitListResultPage) Next() error { 6639 next, err := page.fn(page.erclr) 6640 if err != nil { 6641 return err 6642 } 6643 page.erclr = next 6644 return nil 6645} 6646 6647// NotDone returns true if the page enumeration should be started or is not yet complete. 6648func (page ExpressRouteCircuitListResultPage) NotDone() bool { 6649 return !page.erclr.IsEmpty() 6650} 6651 6652// Response returns the raw server response from the last page request. 6653func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { 6654 return page.erclr 6655} 6656 6657// Values returns the slice of values for the current page or nil if there are no values. 6658func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { 6659 if page.erclr.IsEmpty() { 6660 return nil 6661 } 6662 return *page.erclr.Value 6663} 6664 6665// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. 6666type ExpressRouteCircuitPeering struct { 6667 autorest.Response `json:"-"` 6668 *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` 6669 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 6670 Name *string `json:"name,omitempty"` 6671 // Etag - A unique read-only string that changes whenever the resource is updated. 6672 Etag *string `json:"etag,omitempty"` 6673 // ID - Resource ID. 6674 ID *string `json:"id,omitempty"` 6675} 6676 6677// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. 6678func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { 6679 objectMap := make(map[string]interface{}) 6680 if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { 6681 objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat 6682 } 6683 if ercp.Name != nil { 6684 objectMap["name"] = ercp.Name 6685 } 6686 if ercp.Etag != nil { 6687 objectMap["etag"] = ercp.Etag 6688 } 6689 if ercp.ID != nil { 6690 objectMap["id"] = ercp.ID 6691 } 6692 return json.Marshal(objectMap) 6693} 6694 6695// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. 6696func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { 6697 var m map[string]*json.RawMessage 6698 err := json.Unmarshal(body, &m) 6699 if err != nil { 6700 return err 6701 } 6702 for k, v := range m { 6703 switch k { 6704 case "properties": 6705 if v != nil { 6706 var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat 6707 err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) 6708 if err != nil { 6709 return err 6710 } 6711 ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat 6712 } 6713 case "name": 6714 if v != nil { 6715 var name string 6716 err = json.Unmarshal(*v, &name) 6717 if err != nil { 6718 return err 6719 } 6720 ercp.Name = &name 6721 } 6722 case "etag": 6723 if v != nil { 6724 var etag string 6725 err = json.Unmarshal(*v, &etag) 6726 if err != nil { 6727 return err 6728 } 6729 ercp.Etag = &etag 6730 } 6731 case "id": 6732 if v != nil { 6733 var ID string 6734 err = json.Unmarshal(*v, &ID) 6735 if err != nil { 6736 return err 6737 } 6738 ercp.ID = &ID 6739 } 6740 } 6741 } 6742 6743 return nil 6744} 6745 6746// ExpressRouteCircuitPeeringConfig specifies the peering configuration. 6747type ExpressRouteCircuitPeeringConfig struct { 6748 // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. 6749 AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` 6750 // AdvertisedCommunities - The communities of bgp peering. Spepcified for microsoft peering 6751 AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` 6752 // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' 6753 AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` 6754 // LegacyMode - The legacy mode of the peering. 6755 LegacyMode *int32 `json:"legacyMode,omitempty"` 6756 // CustomerASN - The CustomerASN of the peering. 6757 CustomerASN *int32 `json:"customerASN,omitempty"` 6758 // RoutingRegistryName - The RoutingRegistryName of the configuration. 6759 RoutingRegistryName *string `json:"routingRegistryName,omitempty"` 6760} 6761 6762// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that 6763// belong to an ExpressRouteCircuit. 6764type ExpressRouteCircuitPeeringListResult struct { 6765 autorest.Response `json:"-"` 6766 // Value - The peerings in an express route circuit. 6767 Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` 6768 // NextLink - The URL to get the next set of results. 6769 NextLink *string `json:"nextLink,omitempty"` 6770} 6771 6772// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering 6773// values. 6774type ExpressRouteCircuitPeeringListResultIterator struct { 6775 i int 6776 page ExpressRouteCircuitPeeringListResultPage 6777} 6778 6779// Next advances to the next value. If there was an error making 6780// the request the iterator does not advance and the error is returned. 6781func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { 6782 iter.i++ 6783 if iter.i < len(iter.page.Values()) { 6784 return nil 6785 } 6786 err := iter.page.Next() 6787 if err != nil { 6788 iter.i-- 6789 return err 6790 } 6791 iter.i = 0 6792 return nil 6793} 6794 6795// NotDone returns true if the enumeration should be started or is not yet complete. 6796func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { 6797 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6798} 6799 6800// Response returns the raw server response from the last page request. 6801func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { 6802 return iter.page.Response() 6803} 6804 6805// Value returns the current value or a zero-initialized value if the 6806// iterator has advanced beyond the end of the collection. 6807func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { 6808 if !iter.page.NotDone() { 6809 return ExpressRouteCircuitPeering{} 6810 } 6811 return iter.page.Values()[iter.i] 6812} 6813 6814// IsEmpty returns true if the ListResult contains no values. 6815func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { 6816 return ercplr.Value == nil || len(*ercplr.Value) == 0 6817} 6818 6819// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. 6820// It returns nil if no more results exist. 6821func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) { 6822 if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { 6823 return nil, nil 6824 } 6825 return autorest.Prepare(&http.Request{}, 6826 autorest.AsJSON(), 6827 autorest.AsGet(), 6828 autorest.WithBaseURL(to.String(ercplr.NextLink))) 6829} 6830 6831// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. 6832type ExpressRouteCircuitPeeringListResultPage struct { 6833 fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) 6834 ercplr ExpressRouteCircuitPeeringListResult 6835} 6836 6837// Next advances to the next page of values. If there was an error making 6838// the request the page does not advance and the error is returned. 6839func (page *ExpressRouteCircuitPeeringListResultPage) Next() error { 6840 next, err := page.fn(page.ercplr) 6841 if err != nil { 6842 return err 6843 } 6844 page.ercplr = next 6845 return nil 6846} 6847 6848// NotDone returns true if the page enumeration should be started or is not yet complete. 6849func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { 6850 return !page.ercplr.IsEmpty() 6851} 6852 6853// Response returns the raw server response from the last page request. 6854func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { 6855 return page.ercplr 6856} 6857 6858// Values returns the slice of values for the current page or nil if there are no values. 6859func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { 6860 if page.ercplr.IsEmpty() { 6861 return nil 6862 } 6863 return *page.ercplr.Value 6864} 6865 6866// ExpressRouteCircuitPeeringPropertiesFormat ... 6867type ExpressRouteCircuitPeeringPropertiesFormat struct { 6868 // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' 6869 PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` 6870 // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' 6871 State ExpressRoutePeeringState `json:"state,omitempty"` 6872 // AzureASN - The Azure ASN. 6873 AzureASN *int32 `json:"azureASN,omitempty"` 6874 // PeerASN - The peer ASN. 6875 PeerASN *int64 `json:"peerASN,omitempty"` 6876 // PrimaryPeerAddressPrefix - The primary address prefix. 6877 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 6878 // SecondaryPeerAddressPrefix - The secondary address prefix. 6879 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 6880 // PrimaryAzurePort - The primary port. 6881 PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` 6882 // SecondaryAzurePort - The secondary port. 6883 SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` 6884 // SharedKey - The shared key. 6885 SharedKey *string `json:"sharedKey,omitempty"` 6886 // VlanID - The VLAN ID. 6887 VlanID *int32 `json:"vlanId,omitempty"` 6888 // MicrosoftPeeringConfig - The Microsoft peering configuration. 6889 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 6890 // Stats - Gets peering stats. 6891 Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` 6892 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 6893 ProvisioningState *string `json:"provisioningState,omitempty"` 6894 // GatewayManagerEtag - The GatewayManager Etag. 6895 GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` 6896 // LastModifiedBy - Gets whether the provider or the customer last modified the peering. 6897 LastModifiedBy *string `json:"lastModifiedBy,omitempty"` 6898 // RouteFilter - The reference of the RouteFilter resource. 6899 RouteFilter *RouteFilter `json:"routeFilter,omitempty"` 6900 // Ipv6PeeringConfig - The IPv6 peering configuration. 6901 Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` 6902 // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. 6903 Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` 6904} 6905 6906// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 6907// long-running operation. 6908type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { 6909 azure.Future 6910 req *http.Request 6911} 6912 6913// Result returns the result of the asynchronous operation. 6914// If the operation has not completed it will return an error. 6915func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { 6916 var done bool 6917 done, err = future.Done(client) 6918 if err != nil { 6919 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 6920 return 6921 } 6922 if !done { 6923 return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") 6924 } 6925 if future.PollingMethod() == azure.PollingLocation { 6926 ercp, err = client.CreateOrUpdateResponder(future.Response()) 6927 if err != nil { 6928 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 6929 } 6930 return 6931 } 6932 var req *http.Request 6933 var resp *http.Response 6934 if future.PollingURL() != "" { 6935 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6936 if err != nil { 6937 return 6938 } 6939 } else { 6940 req = autorest.ChangeToGet(future.req) 6941 } 6942 resp, err = autorest.SendWithSender(client, req, 6943 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6944 if err != nil { 6945 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 6946 return 6947 } 6948 ercp, err = client.CreateOrUpdateResponder(resp) 6949 if err != nil { 6950 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 6951 } 6952 return 6953} 6954 6955// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a 6956// long-running operation. 6957type ExpressRouteCircuitPeeringsDeleteFuture struct { 6958 azure.Future 6959 req *http.Request 6960} 6961 6962// Result returns the result of the asynchronous operation. 6963// If the operation has not completed it will return an error. 6964func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { 6965 var done bool 6966 done, err = future.Done(client) 6967 if err != nil { 6968 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") 6969 return 6970 } 6971 if !done { 6972 return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") 6973 } 6974 if future.PollingMethod() == azure.PollingLocation { 6975 ar, err = client.DeleteResponder(future.Response()) 6976 if err != nil { 6977 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request") 6978 } 6979 return 6980 } 6981 var req *http.Request 6982 var resp *http.Response 6983 if future.PollingURL() != "" { 6984 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 6985 if err != nil { 6986 return 6987 } 6988 } else { 6989 req = autorest.ChangeToGet(future.req) 6990 } 6991 resp, err = autorest.SendWithSender(client, req, 6992 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6993 if err != nil { 6994 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request") 6995 return 6996 } 6997 ar, err = client.DeleteResponder(resp) 6998 if err != nil { 6999 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request") 7000 } 7001 return 7002} 7003 7004// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. 7005type ExpressRouteCircuitPropertiesFormat struct { 7006 // AllowClassicOperations - Allow classic operations 7007 AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` 7008 // CircuitProvisioningState - The CircuitProvisioningState state of the resource. 7009 CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` 7010 // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' 7011 ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` 7012 // Authorizations - The list of authorizations. 7013 Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` 7014 // Peerings - The list of peerings. 7015 Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` 7016 // ServiceKey - The ServiceKey. 7017 ServiceKey *string `json:"serviceKey,omitempty"` 7018 // ServiceProviderNotes - The ServiceProviderNotes. 7019 ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` 7020 // ServiceProviderProperties - The ServiceProviderProperties. 7021 ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` 7022 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7023 ProvisioningState *string `json:"provisioningState,omitempty"` 7024 // GatewayManagerEtag - The GatewayManager Etag. 7025 GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` 7026} 7027 7028// ExpressRouteCircuitReference ... 7029type ExpressRouteCircuitReference struct { 7030 // ID - Corresponding Express Route Circuit Id. 7031 ID *string `json:"id,omitempty"` 7032} 7033 7034// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit 7035type ExpressRouteCircuitRoutesTable struct { 7036 // NetworkProperty - network 7037 NetworkProperty *string `json:"network,omitempty"` 7038 // NextHop - nextHop 7039 NextHop *string `json:"nextHop,omitempty"` 7040 // LocPrf - locPrf 7041 LocPrf *string `json:"locPrf,omitempty"` 7042 // Weight - weight. 7043 Weight *int32 `json:"weight,omitempty"` 7044 // Path - path 7045 Path *string `json:"path,omitempty"` 7046} 7047 7048// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. 7049type ExpressRouteCircuitRoutesTableSummary struct { 7050 // Neighbor - Neighbor 7051 Neighbor *string `json:"neighbor,omitempty"` 7052 // V - BGP version number spoken to the neighbor. 7053 V *int32 `json:"v,omitempty"` 7054 // As - Autonomous system number. 7055 As *int32 `json:"as,omitempty"` 7056 // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. 7057 UpDown *string `json:"upDown,omitempty"` 7058 // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. 7059 StatePfxRcd *string `json:"statePfxRcd,omitempty"` 7060} 7061 7062// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API. 7063type ExpressRouteCircuitsArpTableListResult struct { 7064 autorest.Response `json:"-"` 7065 // Value - Gets list of the ARP table. 7066 Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` 7067 // NextLink - The URL to get the next set of results. 7068 NextLink *string `json:"nextLink,omitempty"` 7069} 7070 7071// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 7072// long-running operation. 7073type ExpressRouteCircuitsCreateOrUpdateFuture struct { 7074 azure.Future 7075 req *http.Request 7076} 7077 7078// Result returns the result of the asynchronous operation. 7079// If the operation has not completed it will return an error. 7080func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { 7081 var done bool 7082 done, err = future.Done(client) 7083 if err != nil { 7084 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 7085 return 7086 } 7087 if !done { 7088 return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") 7089 } 7090 if future.PollingMethod() == azure.PollingLocation { 7091 erc, err = client.CreateOrUpdateResponder(future.Response()) 7092 if err != nil { 7093 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 7094 } 7095 return 7096 } 7097 var req *http.Request 7098 var resp *http.Response 7099 if future.PollingURL() != "" { 7100 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7101 if err != nil { 7102 return 7103 } 7104 } else { 7105 req = autorest.ChangeToGet(future.req) 7106 } 7107 resp, err = autorest.SendWithSender(client, req, 7108 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7109 if err != nil { 7110 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 7111 return 7112 } 7113 erc, err = client.CreateOrUpdateResponder(resp) 7114 if err != nil { 7115 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 7116 } 7117 return 7118} 7119 7120// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 7121// operation. 7122type ExpressRouteCircuitsDeleteFuture struct { 7123 azure.Future 7124 req *http.Request 7125} 7126 7127// Result returns the result of the asynchronous operation. 7128// If the operation has not completed it will return an error. 7129func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { 7130 var done bool 7131 done, err = future.Done(client) 7132 if err != nil { 7133 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") 7134 return 7135 } 7136 if !done { 7137 return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") 7138 } 7139 if future.PollingMethod() == azure.PollingLocation { 7140 ar, err = client.DeleteResponder(future.Response()) 7141 if err != nil { 7142 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request") 7143 } 7144 return 7145 } 7146 var req *http.Request 7147 var resp *http.Response 7148 if future.PollingURL() != "" { 7149 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7150 if err != nil { 7151 return 7152 } 7153 } else { 7154 req = autorest.ChangeToGet(future.req) 7155 } 7156 resp, err = autorest.SendWithSender(client, req, 7157 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7158 if err != nil { 7159 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request") 7160 return 7161 } 7162 ar, err = client.DeleteResponder(resp) 7163 if err != nil { 7164 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request") 7165 } 7166 return 7167} 7168 7169// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit. 7170type ExpressRouteCircuitServiceProviderProperties struct { 7171 // ServiceProviderName - The serviceProviderName. 7172 ServiceProviderName *string `json:"serviceProviderName,omitempty"` 7173 // PeeringLocation - The peering location. 7174 PeeringLocation *string `json:"peeringLocation,omitempty"` 7175 // BandwidthInMbps - The BandwidthInMbps. 7176 BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` 7177} 7178 7179// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. 7180type ExpressRouteCircuitSku struct { 7181 // Name - The name of the SKU. 7182 Name *string `json:"name,omitempty"` 7183 // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium' 7184 Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` 7185 // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData' 7186 Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` 7187} 7188 7189// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a 7190// long-running operation. 7191type ExpressRouteCircuitsListArpTableFuture struct { 7192 azure.Future 7193 req *http.Request 7194} 7195 7196// Result returns the result of the asynchronous operation. 7197// If the operation has not completed it will return an error. 7198func (future ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { 7199 var done bool 7200 done, err = future.Done(client) 7201 if err != nil { 7202 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") 7203 return 7204 } 7205 if !done { 7206 return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") 7207 } 7208 if future.PollingMethod() == azure.PollingLocation { 7209 ercatlr, err = client.ListArpTableResponder(future.Response()) 7210 if err != nil { 7211 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Failure responding to request") 7212 } 7213 return 7214 } 7215 var req *http.Request 7216 var resp *http.Response 7217 if future.PollingURL() != "" { 7218 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7219 if err != nil { 7220 return 7221 } 7222 } else { 7223 req = autorest.ChangeToGet(future.req) 7224 } 7225 resp, err = autorest.SendWithSender(client, req, 7226 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7227 if err != nil { 7228 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure sending request") 7229 return 7230 } 7231 ercatlr, err = client.ListArpTableResponder(resp) 7232 if err != nil { 7233 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", resp, "Failure responding to request") 7234 } 7235 return 7236} 7237 7238// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a 7239// long-running operation. 7240type ExpressRouteCircuitsListRoutesTableFuture struct { 7241 azure.Future 7242 req *http.Request 7243} 7244 7245// Result returns the result of the asynchronous operation. 7246// If the operation has not completed it will return an error. 7247func (future ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { 7248 var done bool 7249 done, err = future.Done(client) 7250 if err != nil { 7251 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") 7252 return 7253 } 7254 if !done { 7255 return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") 7256 } 7257 if future.PollingMethod() == azure.PollingLocation { 7258 ercrtlr, err = client.ListRoutesTableResponder(future.Response()) 7259 if err != nil { 7260 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request") 7261 } 7262 return 7263 } 7264 var req *http.Request 7265 var resp *http.Response 7266 if future.PollingURL() != "" { 7267 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7268 if err != nil { 7269 return 7270 } 7271 } else { 7272 req = autorest.ChangeToGet(future.req) 7273 } 7274 resp, err = autorest.SendWithSender(client, req, 7275 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7276 if err != nil { 7277 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure sending request") 7278 return 7279 } 7280 ercrtlr, err = client.ListRoutesTableResponder(resp) 7281 if err != nil { 7282 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", resp, "Failure responding to request") 7283 } 7284 return 7285} 7286 7287// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of a 7288// long-running operation. 7289type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { 7290 azure.Future 7291 req *http.Request 7292} 7293 7294// Result returns the result of the asynchronous operation. 7295// If the operation has not completed it will return an error. 7296func (future ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { 7297 var done bool 7298 done, err = future.Done(client) 7299 if err != nil { 7300 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") 7301 return 7302 } 7303 if !done { 7304 return ercrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") 7305 } 7306 if future.PollingMethod() == azure.PollingLocation { 7307 ercrtslr, err = client.ListRoutesTableSummaryResponder(future.Response()) 7308 if err != nil { 7309 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request") 7310 } 7311 return 7312 } 7313 var req *http.Request 7314 var resp *http.Response 7315 if future.PollingURL() != "" { 7316 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7317 if err != nil { 7318 return 7319 } 7320 } else { 7321 req = autorest.ChangeToGet(future.req) 7322 } 7323 resp, err = autorest.SendWithSender(client, req, 7324 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7325 if err != nil { 7326 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request") 7327 return 7328 } 7329 ercrtslr, err = client.ListRoutesTableSummaryResponder(resp) 7330 if err != nil { 7331 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request") 7332 } 7333 return 7334} 7335 7336// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route 7337// Circuits API. 7338type ExpressRouteCircuitsRoutesTableListResult struct { 7339 autorest.Response `json:"-"` 7340 // Value - The list of routes table. 7341 Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` 7342 // NextLink - The URL to get the next set of results. 7343 NextLink *string `json:"nextLink,omitempty"` 7344} 7345 7346// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express Route 7347// Circuits API. 7348type ExpressRouteCircuitsRoutesTableSummaryListResult struct { 7349 autorest.Response `json:"-"` 7350 // Value - A list of the routes table. 7351 Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` 7352 // NextLink - The URL to get the next set of results. 7353 NextLink *string `json:"nextLink,omitempty"` 7354} 7355 7356// ExpressRouteCircuitStats contains stats associated with the peering. 7357type ExpressRouteCircuitStats struct { 7358 autorest.Response `json:"-"` 7359 // PrimarybytesIn - Gets BytesIn of the peering. 7360 PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` 7361 // PrimarybytesOut - Gets BytesOut of the peering. 7362 PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` 7363 // SecondarybytesIn - Gets BytesIn of the peering. 7364 SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` 7365 // SecondarybytesOut - Gets BytesOut of the peering. 7366 SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` 7367} 7368 7369// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 7370// operation. 7371type ExpressRouteCircuitsUpdateTagsFuture struct { 7372 azure.Future 7373 req *http.Request 7374} 7375 7376// Result returns the result of the asynchronous operation. 7377// If the operation has not completed it will return an error. 7378func (future ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { 7379 var done bool 7380 done, err = future.Done(client) 7381 if err != nil { 7382 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 7383 return 7384 } 7385 if !done { 7386 return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") 7387 } 7388 if future.PollingMethod() == azure.PollingLocation { 7389 erc, err = client.UpdateTagsResponder(future.Response()) 7390 if err != nil { 7391 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 7392 } 7393 return 7394 } 7395 var req *http.Request 7396 var resp *http.Response 7397 if future.PollingURL() != "" { 7398 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7399 if err != nil { 7400 return 7401 } 7402 } else { 7403 req = autorest.ChangeToGet(future.req) 7404 } 7405 resp, err = autorest.SendWithSender(client, req, 7406 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7407 if err != nil { 7408 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure sending request") 7409 return 7410 } 7411 erc, err = client.UpdateTagsResponder(resp) 7412 if err != nil { 7413 err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", resp, "Failure responding to request") 7414 } 7415 return 7416} 7417 7418// ExpressRouteCrossConnection expressRouteCrossConnection resource 7419type ExpressRouteCrossConnection struct { 7420 autorest.Response `json:"-"` 7421 *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` 7422 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 7423 Etag *string `json:"etag,omitempty"` 7424 // ID - Resource ID. 7425 ID *string `json:"id,omitempty"` 7426 // Name - Resource name. 7427 Name *string `json:"name,omitempty"` 7428 // Type - Resource type. 7429 Type *string `json:"type,omitempty"` 7430 // Location - Resource location. 7431 Location *string `json:"location,omitempty"` 7432 // Tags - Resource tags. 7433 Tags map[string]*string `json:"tags"` 7434} 7435 7436// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. 7437func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { 7438 objectMap := make(map[string]interface{}) 7439 if ercc.ExpressRouteCrossConnectionProperties != nil { 7440 objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties 7441 } 7442 if ercc.Etag != nil { 7443 objectMap["etag"] = ercc.Etag 7444 } 7445 if ercc.ID != nil { 7446 objectMap["id"] = ercc.ID 7447 } 7448 if ercc.Name != nil { 7449 objectMap["name"] = ercc.Name 7450 } 7451 if ercc.Type != nil { 7452 objectMap["type"] = ercc.Type 7453 } 7454 if ercc.Location != nil { 7455 objectMap["location"] = ercc.Location 7456 } 7457 if ercc.Tags != nil { 7458 objectMap["tags"] = ercc.Tags 7459 } 7460 return json.Marshal(objectMap) 7461} 7462 7463// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. 7464func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { 7465 var m map[string]*json.RawMessage 7466 err := json.Unmarshal(body, &m) 7467 if err != nil { 7468 return err 7469 } 7470 for k, v := range m { 7471 switch k { 7472 case "properties": 7473 if v != nil { 7474 var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties 7475 err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) 7476 if err != nil { 7477 return err 7478 } 7479 ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties 7480 } 7481 case "etag": 7482 if v != nil { 7483 var etag string 7484 err = json.Unmarshal(*v, &etag) 7485 if err != nil { 7486 return err 7487 } 7488 ercc.Etag = &etag 7489 } 7490 case "id": 7491 if v != nil { 7492 var ID string 7493 err = json.Unmarshal(*v, &ID) 7494 if err != nil { 7495 return err 7496 } 7497 ercc.ID = &ID 7498 } 7499 case "name": 7500 if v != nil { 7501 var name string 7502 err = json.Unmarshal(*v, &name) 7503 if err != nil { 7504 return err 7505 } 7506 ercc.Name = &name 7507 } 7508 case "type": 7509 if v != nil { 7510 var typeVar string 7511 err = json.Unmarshal(*v, &typeVar) 7512 if err != nil { 7513 return err 7514 } 7515 ercc.Type = &typeVar 7516 } 7517 case "location": 7518 if v != nil { 7519 var location string 7520 err = json.Unmarshal(*v, &location) 7521 if err != nil { 7522 return err 7523 } 7524 ercc.Location = &location 7525 } 7526 case "tags": 7527 if v != nil { 7528 var tags map[string]*string 7529 err = json.Unmarshal(*v, &tags) 7530 if err != nil { 7531 return err 7532 } 7533 ercc.Tags = tags 7534 } 7535 } 7536 } 7537 7538 return nil 7539} 7540 7541// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. 7542type ExpressRouteCrossConnectionListResult struct { 7543 autorest.Response `json:"-"` 7544 // Value - A list of ExpressRouteCrossConnection resources. 7545 Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` 7546 // NextLink - The URL to get the next set of results. 7547 NextLink *string `json:"nextLink,omitempty"` 7548} 7549 7550// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of 7551// ExpressRouteCrossConnection values. 7552type ExpressRouteCrossConnectionListResultIterator struct { 7553 i int 7554 page ExpressRouteCrossConnectionListResultPage 7555} 7556 7557// Next advances to the next value. If there was an error making 7558// the request the iterator does not advance and the error is returned. 7559func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error { 7560 iter.i++ 7561 if iter.i < len(iter.page.Values()) { 7562 return nil 7563 } 7564 err := iter.page.Next() 7565 if err != nil { 7566 iter.i-- 7567 return err 7568 } 7569 iter.i = 0 7570 return nil 7571} 7572 7573// NotDone returns true if the enumeration should be started or is not yet complete. 7574func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool { 7575 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7576} 7577 7578// Response returns the raw server response from the last page request. 7579func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { 7580 return iter.page.Response() 7581} 7582 7583// Value returns the current value or a zero-initialized value if the 7584// iterator has advanced beyond the end of the collection. 7585func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { 7586 if !iter.page.NotDone() { 7587 return ExpressRouteCrossConnection{} 7588 } 7589 return iter.page.Values()[iter.i] 7590} 7591 7592// IsEmpty returns true if the ListResult contains no values. 7593func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { 7594 return ercclr.Value == nil || len(*ercclr.Value) == 0 7595} 7596 7597// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. 7598// It returns nil if no more results exist. 7599func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer() (*http.Request, error) { 7600 if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { 7601 return nil, nil 7602 } 7603 return autorest.Prepare(&http.Request{}, 7604 autorest.AsJSON(), 7605 autorest.AsGet(), 7606 autorest.WithBaseURL(to.String(ercclr.NextLink))) 7607} 7608 7609// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. 7610type ExpressRouteCrossConnectionListResultPage struct { 7611 fn func(ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) 7612 ercclr ExpressRouteCrossConnectionListResult 7613} 7614 7615// Next advances to the next page of values. If there was an error making 7616// the request the page does not advance and the error is returned. 7617func (page *ExpressRouteCrossConnectionListResultPage) Next() error { 7618 next, err := page.fn(page.ercclr) 7619 if err != nil { 7620 return err 7621 } 7622 page.ercclr = next 7623 return nil 7624} 7625 7626// NotDone returns true if the page enumeration should be started or is not yet complete. 7627func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { 7628 return !page.ercclr.IsEmpty() 7629} 7630 7631// Response returns the raw server response from the last page request. 7632func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { 7633 return page.ercclr 7634} 7635 7636// Values returns the slice of values for the current page or nil if there are no values. 7637func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { 7638 if page.ercclr.IsEmpty() { 7639 return nil 7640 } 7641 return *page.ercclr.Value 7642} 7643 7644// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. 7645type ExpressRouteCrossConnectionPeering struct { 7646 autorest.Response `json:"-"` 7647 *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` 7648 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 7649 Name *string `json:"name,omitempty"` 7650 // Etag - A unique read-only string that changes whenever the resource is updated. 7651 Etag *string `json:"etag,omitempty"` 7652 // ID - Resource ID. 7653 ID *string `json:"id,omitempty"` 7654} 7655 7656// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. 7657func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { 7658 objectMap := make(map[string]interface{}) 7659 if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { 7660 objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties 7661 } 7662 if erccp.Name != nil { 7663 objectMap["name"] = erccp.Name 7664 } 7665 if erccp.Etag != nil { 7666 objectMap["etag"] = erccp.Etag 7667 } 7668 if erccp.ID != nil { 7669 objectMap["id"] = erccp.ID 7670 } 7671 return json.Marshal(objectMap) 7672} 7673 7674// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. 7675func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error { 7676 var m map[string]*json.RawMessage 7677 err := json.Unmarshal(body, &m) 7678 if err != nil { 7679 return err 7680 } 7681 for k, v := range m { 7682 switch k { 7683 case "properties": 7684 if v != nil { 7685 var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties 7686 err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) 7687 if err != nil { 7688 return err 7689 } 7690 erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties 7691 } 7692 case "name": 7693 if v != nil { 7694 var name string 7695 err = json.Unmarshal(*v, &name) 7696 if err != nil { 7697 return err 7698 } 7699 erccp.Name = &name 7700 } 7701 case "etag": 7702 if v != nil { 7703 var etag string 7704 err = json.Unmarshal(*v, &etag) 7705 if err != nil { 7706 return err 7707 } 7708 erccp.Etag = &etag 7709 } 7710 case "id": 7711 if v != nil { 7712 var ID string 7713 err = json.Unmarshal(*v, &ID) 7714 if err != nil { 7715 return err 7716 } 7717 erccp.ID = &ID 7718 } 7719 } 7720 } 7721 7722 return nil 7723} 7724 7725// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that 7726// belong to an ExpressRouteCrossConnection. 7727type ExpressRouteCrossConnectionPeeringList struct { 7728 autorest.Response `json:"-"` 7729 // Value - The peerings in an express route cross connection. 7730 Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` 7731 // NextLink - The URL to get the next set of results. 7732 NextLink *string `json:"nextLink,omitempty"` 7733} 7734 7735// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of 7736// ExpressRouteCrossConnectionPeering values. 7737type ExpressRouteCrossConnectionPeeringListIterator struct { 7738 i int 7739 page ExpressRouteCrossConnectionPeeringListPage 7740} 7741 7742// Next advances to the next value. If there was an error making 7743// the request the iterator does not advance and the error is returned. 7744func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error { 7745 iter.i++ 7746 if iter.i < len(iter.page.Values()) { 7747 return nil 7748 } 7749 err := iter.page.Next() 7750 if err != nil { 7751 iter.i-- 7752 return err 7753 } 7754 iter.i = 0 7755 return nil 7756} 7757 7758// NotDone returns true if the enumeration should be started or is not yet complete. 7759func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool { 7760 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7761} 7762 7763// Response returns the raw server response from the last page request. 7764func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { 7765 return iter.page.Response() 7766} 7767 7768// Value returns the current value or a zero-initialized value if the 7769// iterator has advanced beyond the end of the collection. 7770func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { 7771 if !iter.page.NotDone() { 7772 return ExpressRouteCrossConnectionPeering{} 7773 } 7774 return iter.page.Values()[iter.i] 7775} 7776 7777// IsEmpty returns true if the ListResult contains no values. 7778func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { 7779 return erccpl.Value == nil || len(*erccpl.Value) == 0 7780} 7781 7782// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. 7783// It returns nil if no more results exist. 7784func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer() (*http.Request, error) { 7785 if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { 7786 return nil, nil 7787 } 7788 return autorest.Prepare(&http.Request{}, 7789 autorest.AsJSON(), 7790 autorest.AsGet(), 7791 autorest.WithBaseURL(to.String(erccpl.NextLink))) 7792} 7793 7794// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. 7795type ExpressRouteCrossConnectionPeeringListPage struct { 7796 fn func(ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) 7797 erccpl ExpressRouteCrossConnectionPeeringList 7798} 7799 7800// Next advances to the next page of values. If there was an error making 7801// the request the page does not advance and the error is returned. 7802func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error { 7803 next, err := page.fn(page.erccpl) 7804 if err != nil { 7805 return err 7806 } 7807 page.erccpl = next 7808 return nil 7809} 7810 7811// NotDone returns true if the page enumeration should be started or is not yet complete. 7812func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { 7813 return !page.erccpl.IsEmpty() 7814} 7815 7816// Response returns the raw server response from the last page request. 7817func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { 7818 return page.erccpl 7819} 7820 7821// Values returns the slice of values for the current page or nil if there are no values. 7822func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { 7823 if page.erccpl.IsEmpty() { 7824 return nil 7825 } 7826 return *page.erccpl.Value 7827} 7828 7829// ExpressRouteCrossConnectionPeeringProperties ... 7830type ExpressRouteCrossConnectionPeeringProperties struct { 7831 // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' 7832 PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` 7833 // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' 7834 State ExpressRoutePeeringState `json:"state,omitempty"` 7835 // AzureASN - The Azure ASN. 7836 AzureASN *int32 `json:"azureASN,omitempty"` 7837 // PeerASN - The peer ASN. 7838 PeerASN *int64 `json:"peerASN,omitempty"` 7839 // PrimaryPeerAddressPrefix - The primary address prefix. 7840 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 7841 // SecondaryPeerAddressPrefix - The secondary address prefix. 7842 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 7843 // PrimaryAzurePort - The primary port. 7844 PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` 7845 // SecondaryAzurePort - The secondary port. 7846 SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` 7847 // SharedKey - The shared key. 7848 SharedKey *string `json:"sharedKey,omitempty"` 7849 // VlanID - The VLAN ID. 7850 VlanID *int32 `json:"vlanId,omitempty"` 7851 // MicrosoftPeeringConfig - The Microsoft peering configuration. 7852 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 7853 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7854 ProvisioningState *string `json:"provisioningState,omitempty"` 7855 // GatewayManagerEtag - The GatewayManager Etag. 7856 GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` 7857 // LastModifiedBy - Gets whether the provider or the customer last modified the peering. 7858 LastModifiedBy *string `json:"lastModifiedBy,omitempty"` 7859 // Ipv6PeeringConfig - The IPv6 peering configuration. 7860 Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` 7861} 7862 7863// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results 7864// of a long-running operation. 7865type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { 7866 azure.Future 7867 req *http.Request 7868} 7869 7870// Result returns the result of the asynchronous operation. 7871// If the operation has not completed it will return an error. 7872func (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { 7873 var done bool 7874 done, err = future.Done(client) 7875 if err != nil { 7876 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 7877 return 7878 } 7879 if !done { 7880 return erccp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") 7881 } 7882 if future.PollingMethod() == azure.PollingLocation { 7883 erccp, err = client.CreateOrUpdateResponder(future.Response()) 7884 if err != nil { 7885 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 7886 } 7887 return 7888 } 7889 var req *http.Request 7890 var resp *http.Response 7891 if future.PollingURL() != "" { 7892 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7893 if err != nil { 7894 return 7895 } 7896 } else { 7897 req = autorest.ChangeToGet(future.req) 7898 } 7899 resp, err = autorest.SendWithSender(client, req, 7900 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7901 if err != nil { 7902 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 7903 return 7904 } 7905 erccp, err = client.CreateOrUpdateResponder(resp) 7906 if err != nil { 7907 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 7908 } 7909 return 7910} 7911 7912// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a 7913// long-running operation. 7914type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { 7915 azure.Future 7916 req *http.Request 7917} 7918 7919// Result returns the result of the asynchronous operation. 7920// If the operation has not completed it will return an error. 7921func (future ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { 7922 var done bool 7923 done, err = future.Done(client) 7924 if err != nil { 7925 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") 7926 return 7927 } 7928 if !done { 7929 return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") 7930 } 7931 if future.PollingMethod() == azure.PollingLocation { 7932 ar, err = client.DeleteResponder(future.Response()) 7933 if err != nil { 7934 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request") 7935 } 7936 return 7937 } 7938 var req *http.Request 7939 var resp *http.Response 7940 if future.PollingURL() != "" { 7941 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 7942 if err != nil { 7943 return 7944 } 7945 } else { 7946 req = autorest.ChangeToGet(future.req) 7947 } 7948 resp, err = autorest.SendWithSender(client, req, 7949 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7950 if err != nil { 7951 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure sending request") 7952 return 7953 } 7954 ar, err = client.DeleteResponder(resp) 7955 if err != nil { 7956 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", resp, "Failure responding to request") 7957 } 7958 return 7959} 7960 7961// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. 7962type ExpressRouteCrossConnectionProperties struct { 7963 // PrimaryAzurePort - The name of the primary port. 7964 PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` 7965 // SecondaryAzurePort - The name of the secondary port. 7966 SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` 7967 // STag - The identifier of the circuit traffic. 7968 STag *int32 `json:"sTag,omitempty"` 7969 // PeeringLocation - The peering location of the ExpressRoute circuit. 7970 PeeringLocation *string `json:"peeringLocation,omitempty"` 7971 // BandwidthInMbps - The circuit bandwidth In Mbps. 7972 BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` 7973 // ExpressRouteCircuit - The ExpressRouteCircuit 7974 ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` 7975 // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' 7976 ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` 7977 // ServiceProviderNotes - Additional read only notes set by the connectivity provider. 7978 ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` 7979 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 7980 ProvisioningState *string `json:"provisioningState,omitempty"` 7981 // Peerings - The list of peerings. 7982 Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` 7983} 7984 7985// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. 7986type ExpressRouteCrossConnectionRoutesTableSummary struct { 7987 // Neighbor - IP address of Neighbor router 7988 Neighbor *string `json:"neighbor,omitempty"` 7989 // Asn - Autonomous system number. 7990 Asn *int32 `json:"asn,omitempty"` 7991 // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. 7992 UpDown *string `json:"upDown,omitempty"` 7993 // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. 7994 StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` 7995} 7996 7997// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 7998// long-running operation. 7999type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { 8000 azure.Future 8001 req *http.Request 8002} 8003 8004// Result returns the result of the asynchronous operation. 8005// If the operation has not completed it will return an error. 8006func (future ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { 8007 var done bool 8008 done, err = future.Done(client) 8009 if err != nil { 8010 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 8011 return 8012 } 8013 if !done { 8014 return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") 8015 } 8016 if future.PollingMethod() == azure.PollingLocation { 8017 ercc, err = client.CreateOrUpdateResponder(future.Response()) 8018 if err != nil { 8019 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 8020 } 8021 return 8022 } 8023 var req *http.Request 8024 var resp *http.Response 8025 if future.PollingURL() != "" { 8026 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 8027 if err != nil { 8028 return 8029 } 8030 } else { 8031 req = autorest.ChangeToGet(future.req) 8032 } 8033 resp, err = autorest.SendWithSender(client, req, 8034 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8035 if err != nil { 8036 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 8037 return 8038 } 8039 ercc, err = client.CreateOrUpdateResponder(resp) 8040 if err != nil { 8041 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 8042 } 8043 return 8044} 8045 8046// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a 8047// long-running operation. 8048type ExpressRouteCrossConnectionsListArpTableFuture struct { 8049 azure.Future 8050 req *http.Request 8051} 8052 8053// Result returns the result of the asynchronous operation. 8054// If the operation has not completed it will return an error. 8055func (future ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { 8056 var done bool 8057 done, err = future.Done(client) 8058 if err != nil { 8059 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") 8060 return 8061 } 8062 if !done { 8063 return ercatlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") 8064 } 8065 if future.PollingMethod() == azure.PollingLocation { 8066 ercatlr, err = client.ListArpTableResponder(future.Response()) 8067 if err != nil { 8068 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Failure responding to request") 8069 } 8070 return 8071 } 8072 var req *http.Request 8073 var resp *http.Response 8074 if future.PollingURL() != "" { 8075 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 8076 if err != nil { 8077 return 8078 } 8079 } else { 8080 req = autorest.ChangeToGet(future.req) 8081 } 8082 resp, err = autorest.SendWithSender(client, req, 8083 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8084 if err != nil { 8085 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure sending request") 8086 return 8087 } 8088 ercatlr, err = client.ListArpTableResponder(resp) 8089 if err != nil { 8090 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", resp, "Failure responding to request") 8091 } 8092 return 8093} 8094 8095// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a 8096// long-running operation. 8097type ExpressRouteCrossConnectionsListRoutesTableFuture struct { 8098 azure.Future 8099 req *http.Request 8100} 8101 8102// Result returns the result of the asynchronous operation. 8103// If the operation has not completed it will return an error. 8104func (future ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { 8105 var done bool 8106 done, err = future.Done(client) 8107 if err != nil { 8108 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") 8109 return 8110 } 8111 if !done { 8112 return ercrtlr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") 8113 } 8114 if future.PollingMethod() == azure.PollingLocation { 8115 ercrtlr, err = client.ListRoutesTableResponder(future.Response()) 8116 if err != nil { 8117 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Failure responding to request") 8118 } 8119 return 8120 } 8121 var req *http.Request 8122 var resp *http.Response 8123 if future.PollingURL() != "" { 8124 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 8125 if err != nil { 8126 return 8127 } 8128 } else { 8129 req = autorest.ChangeToGet(future.req) 8130 } 8131 resp, err = autorest.SendWithSender(client, req, 8132 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8133 if err != nil { 8134 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure sending request") 8135 return 8136 } 8137 ercrtlr, err = client.ListRoutesTableResponder(resp) 8138 if err != nil { 8139 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", resp, "Failure responding to request") 8140 } 8141 return 8142} 8143 8144// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the 8145// results of a long-running operation. 8146type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { 8147 azure.Future 8148 req *http.Request 8149} 8150 8151// Result returns the result of the asynchronous operation. 8152// If the operation has not completed it will return an error. 8153func (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { 8154 var done bool 8155 done, err = future.Done(client) 8156 if err != nil { 8157 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") 8158 return 8159 } 8160 if !done { 8161 return erccrtslr, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") 8162 } 8163 if future.PollingMethod() == azure.PollingLocation { 8164 erccrtslr, err = client.ListRoutesTableSummaryResponder(future.Response()) 8165 if err != nil { 8166 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Failure responding to request") 8167 } 8168 return 8169 } 8170 var req *http.Request 8171 var resp *http.Response 8172 if future.PollingURL() != "" { 8173 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 8174 if err != nil { 8175 return 8176 } 8177 } else { 8178 req = autorest.ChangeToGet(future.req) 8179 } 8180 resp, err = autorest.SendWithSender(client, req, 8181 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8182 if err != nil { 8183 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure sending request") 8184 return 8185 } 8186 erccrtslr, err = client.ListRoutesTableSummaryResponder(resp) 8187 if err != nil { 8188 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", resp, "Failure responding to request") 8189 } 8190 return 8191} 8192 8193// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the 8194// Express Route Cross Connections. 8195type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { 8196 autorest.Response `json:"-"` 8197 // Value - A list of the routes table. 8198 Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` 8199 // NextLink - The URL to get the next set of results. 8200 NextLink *string `json:"nextLink,omitempty"` 8201} 8202 8203// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 8204// long-running operation. 8205type ExpressRouteCrossConnectionsUpdateTagsFuture struct { 8206 azure.Future 8207 req *http.Request 8208} 8209 8210// Result returns the result of the asynchronous operation. 8211// If the operation has not completed it will return an error. 8212func (future ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { 8213 var done bool 8214 done, err = future.Done(client) 8215 if err != nil { 8216 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 8217 return 8218 } 8219 if !done { 8220 return ercc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") 8221 } 8222 if future.PollingMethod() == azure.PollingLocation { 8223 ercc, err = client.UpdateTagsResponder(future.Response()) 8224 if err != nil { 8225 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 8226 } 8227 return 8228 } 8229 var req *http.Request 8230 var resp *http.Response 8231 if future.PollingURL() != "" { 8232 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 8233 if err != nil { 8234 return 8235 } 8236 } else { 8237 req = autorest.ChangeToGet(future.req) 8238 } 8239 resp, err = autorest.SendWithSender(client, req, 8240 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8241 if err != nil { 8242 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request") 8243 return 8244 } 8245 ercc, err = client.UpdateTagsResponder(resp) 8246 if err != nil { 8247 err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request") 8248 } 8249 return 8250} 8251 8252// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. 8253type ExpressRouteServiceProvider struct { 8254 *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` 8255 // ID - Resource ID. 8256 ID *string `json:"id,omitempty"` 8257 // Name - Resource name. 8258 Name *string `json:"name,omitempty"` 8259 // Type - Resource type. 8260 Type *string `json:"type,omitempty"` 8261 // Location - Resource location. 8262 Location *string `json:"location,omitempty"` 8263 // Tags - Resource tags. 8264 Tags map[string]*string `json:"tags"` 8265} 8266 8267// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. 8268func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { 8269 objectMap := make(map[string]interface{}) 8270 if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { 8271 objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat 8272 } 8273 if ersp.ID != nil { 8274 objectMap["id"] = ersp.ID 8275 } 8276 if ersp.Name != nil { 8277 objectMap["name"] = ersp.Name 8278 } 8279 if ersp.Type != nil { 8280 objectMap["type"] = ersp.Type 8281 } 8282 if ersp.Location != nil { 8283 objectMap["location"] = ersp.Location 8284 } 8285 if ersp.Tags != nil { 8286 objectMap["tags"] = ersp.Tags 8287 } 8288 return json.Marshal(objectMap) 8289} 8290 8291// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. 8292func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { 8293 var m map[string]*json.RawMessage 8294 err := json.Unmarshal(body, &m) 8295 if err != nil { 8296 return err 8297 } 8298 for k, v := range m { 8299 switch k { 8300 case "properties": 8301 if v != nil { 8302 var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat 8303 err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) 8304 if err != nil { 8305 return err 8306 } 8307 ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat 8308 } 8309 case "id": 8310 if v != nil { 8311 var ID string 8312 err = json.Unmarshal(*v, &ID) 8313 if err != nil { 8314 return err 8315 } 8316 ersp.ID = &ID 8317 } 8318 case "name": 8319 if v != nil { 8320 var name string 8321 err = json.Unmarshal(*v, &name) 8322 if err != nil { 8323 return err 8324 } 8325 ersp.Name = &name 8326 } 8327 case "type": 8328 if v != nil { 8329 var typeVar string 8330 err = json.Unmarshal(*v, &typeVar) 8331 if err != nil { 8332 return err 8333 } 8334 ersp.Type = &typeVar 8335 } 8336 case "location": 8337 if v != nil { 8338 var location string 8339 err = json.Unmarshal(*v, &location) 8340 if err != nil { 8341 return err 8342 } 8343 ersp.Location = &location 8344 } 8345 case "tags": 8346 if v != nil { 8347 var tags map[string]*string 8348 err = json.Unmarshal(*v, &tags) 8349 if err != nil { 8350 return err 8351 } 8352 ersp.Tags = tags 8353 } 8354 } 8355 } 8356 8357 return nil 8358} 8359 8360// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider 8361// resources. 8362type ExpressRouteServiceProviderBandwidthsOffered struct { 8363 // OfferName - The OfferName. 8364 OfferName *string `json:"offerName,omitempty"` 8365 // ValueInMbps - The ValueInMbps. 8366 ValueInMbps *int32 `json:"valueInMbps,omitempty"` 8367} 8368 8369// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. 8370type ExpressRouteServiceProviderListResult struct { 8371 autorest.Response `json:"-"` 8372 // Value - A list of ExpressRouteResourceProvider resources. 8373 Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` 8374 // NextLink - The URL to get the next set of results. 8375 NextLink *string `json:"nextLink,omitempty"` 8376} 8377 8378// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of 8379// ExpressRouteServiceProvider values. 8380type ExpressRouteServiceProviderListResultIterator struct { 8381 i int 8382 page ExpressRouteServiceProviderListResultPage 8383} 8384 8385// Next advances to the next value. If there was an error making 8386// the request the iterator does not advance and the error is returned. 8387func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { 8388 iter.i++ 8389 if iter.i < len(iter.page.Values()) { 8390 return nil 8391 } 8392 err := iter.page.Next() 8393 if err != nil { 8394 iter.i-- 8395 return err 8396 } 8397 iter.i = 0 8398 return nil 8399} 8400 8401// NotDone returns true if the enumeration should be started or is not yet complete. 8402func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { 8403 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8404} 8405 8406// Response returns the raw server response from the last page request. 8407func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { 8408 return iter.page.Response() 8409} 8410 8411// Value returns the current value or a zero-initialized value if the 8412// iterator has advanced beyond the end of the collection. 8413func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { 8414 if !iter.page.NotDone() { 8415 return ExpressRouteServiceProvider{} 8416 } 8417 return iter.page.Values()[iter.i] 8418} 8419 8420// IsEmpty returns true if the ListResult contains no values. 8421func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { 8422 return ersplr.Value == nil || len(*ersplr.Value) == 0 8423} 8424 8425// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. 8426// It returns nil if no more results exist. 8427func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) { 8428 if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { 8429 return nil, nil 8430 } 8431 return autorest.Prepare(&http.Request{}, 8432 autorest.AsJSON(), 8433 autorest.AsGet(), 8434 autorest.WithBaseURL(to.String(ersplr.NextLink))) 8435} 8436 8437// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. 8438type ExpressRouteServiceProviderListResultPage struct { 8439 fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) 8440 ersplr ExpressRouteServiceProviderListResult 8441} 8442 8443// Next advances to the next page of values. If there was an error making 8444// the request the page does not advance and the error is returned. 8445func (page *ExpressRouteServiceProviderListResultPage) Next() error { 8446 next, err := page.fn(page.ersplr) 8447 if err != nil { 8448 return err 8449 } 8450 page.ersplr = next 8451 return nil 8452} 8453 8454// NotDone returns true if the page enumeration should be started or is not yet complete. 8455func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { 8456 return !page.ersplr.IsEmpty() 8457} 8458 8459// Response returns the raw server response from the last page request. 8460func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { 8461 return page.ersplr 8462} 8463 8464// Values returns the slice of values for the current page or nil if there are no values. 8465func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { 8466 if page.ersplr.IsEmpty() { 8467 return nil 8468 } 8469 return *page.ersplr.Value 8470} 8471 8472// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. 8473type ExpressRouteServiceProviderPropertiesFormat struct { 8474 // PeeringLocations - Get a list of peering locations. 8475 PeeringLocations *[]string `json:"peeringLocations,omitempty"` 8476 // BandwidthsOffered - Gets bandwidths offered. 8477 BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` 8478 // ProvisioningState - Gets the provisioning state of the resource. 8479 ProvisioningState *string `json:"provisioningState,omitempty"` 8480} 8481 8482// FlowLogInformation information on the configuration of flow log. 8483type FlowLogInformation struct { 8484 autorest.Response `json:"-"` 8485 // TargetResourceID - The ID of the resource to configure for flow logging. 8486 TargetResourceID *string `json:"targetResourceId,omitempty"` 8487 *FlowLogProperties `json:"properties,omitempty"` 8488} 8489 8490// MarshalJSON is the custom marshaler for FlowLogInformation. 8491func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { 8492 objectMap := make(map[string]interface{}) 8493 if fli.TargetResourceID != nil { 8494 objectMap["targetResourceId"] = fli.TargetResourceID 8495 } 8496 if fli.FlowLogProperties != nil { 8497 objectMap["properties"] = fli.FlowLogProperties 8498 } 8499 return json.Marshal(objectMap) 8500} 8501 8502// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. 8503func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error { 8504 var m map[string]*json.RawMessage 8505 err := json.Unmarshal(body, &m) 8506 if err != nil { 8507 return err 8508 } 8509 for k, v := range m { 8510 switch k { 8511 case "targetResourceId": 8512 if v != nil { 8513 var targetResourceID string 8514 err = json.Unmarshal(*v, &targetResourceID) 8515 if err != nil { 8516 return err 8517 } 8518 fli.TargetResourceID = &targetResourceID 8519 } 8520 case "properties": 8521 if v != nil { 8522 var flowLogProperties FlowLogProperties 8523 err = json.Unmarshal(*v, &flowLogProperties) 8524 if err != nil { 8525 return err 8526 } 8527 fli.FlowLogProperties = &flowLogProperties 8528 } 8529 } 8530 } 8531 8532 return nil 8533} 8534 8535// FlowLogProperties parameters that define the configuration of flow log. 8536type FlowLogProperties struct { 8537 // StorageID - ID of the storage account which is used to store the flow log. 8538 StorageID *string `json:"storageId,omitempty"` 8539 // Enabled - Flag to enable/disable flow logging. 8540 Enabled *bool `json:"enabled,omitempty"` 8541 RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` 8542} 8543 8544// FlowLogStatusParameters parameters that define a resource to query flow log status. 8545type FlowLogStatusParameters struct { 8546 // TargetResourceID - The target resource where getting the flow logging status. 8547 TargetResourceID *string `json:"targetResourceId,omitempty"` 8548} 8549 8550// FrontendIPConfiguration frontend IP address of the load balancer. 8551type FrontendIPConfiguration struct { 8552 autorest.Response `json:"-"` 8553 // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. 8554 *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` 8555 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 8556 Name *string `json:"name,omitempty"` 8557 // Etag - A unique read-only string that changes whenever the resource is updated. 8558 Etag *string `json:"etag,omitempty"` 8559 // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. 8560 Zones *[]string `json:"zones,omitempty"` 8561 // ID - Resource ID. 8562 ID *string `json:"id,omitempty"` 8563} 8564 8565// MarshalJSON is the custom marshaler for FrontendIPConfiguration. 8566func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { 8567 objectMap := make(map[string]interface{}) 8568 if fic.FrontendIPConfigurationPropertiesFormat != nil { 8569 objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat 8570 } 8571 if fic.Name != nil { 8572 objectMap["name"] = fic.Name 8573 } 8574 if fic.Etag != nil { 8575 objectMap["etag"] = fic.Etag 8576 } 8577 if fic.Zones != nil { 8578 objectMap["zones"] = fic.Zones 8579 } 8580 if fic.ID != nil { 8581 objectMap["id"] = fic.ID 8582 } 8583 return json.Marshal(objectMap) 8584} 8585 8586// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. 8587func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { 8588 var m map[string]*json.RawMessage 8589 err := json.Unmarshal(body, &m) 8590 if err != nil { 8591 return err 8592 } 8593 for k, v := range m { 8594 switch k { 8595 case "properties": 8596 if v != nil { 8597 var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat 8598 err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) 8599 if err != nil { 8600 return err 8601 } 8602 fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat 8603 } 8604 case "name": 8605 if v != nil { 8606 var name string 8607 err = json.Unmarshal(*v, &name) 8608 if err != nil { 8609 return err 8610 } 8611 fic.Name = &name 8612 } 8613 case "etag": 8614 if v != nil { 8615 var etag string 8616 err = json.Unmarshal(*v, &etag) 8617 if err != nil { 8618 return err 8619 } 8620 fic.Etag = &etag 8621 } 8622 case "zones": 8623 if v != nil { 8624 var zones []string 8625 err = json.Unmarshal(*v, &zones) 8626 if err != nil { 8627 return err 8628 } 8629 fic.Zones = &zones 8630 } 8631 case "id": 8632 if v != nil { 8633 var ID string 8634 err = json.Unmarshal(*v, &ID) 8635 if err != nil { 8636 return err 8637 } 8638 fic.ID = &ID 8639 } 8640 } 8641 } 8642 8643 return nil 8644} 8645 8646// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. 8647type FrontendIPConfigurationPropertiesFormat struct { 8648 // InboundNatRules - Read only. Inbound rules URIs that use this frontend IP. 8649 InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` 8650 // InboundNatPools - Read only. Inbound pools URIs that use this frontend IP. 8651 InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` 8652 // OutboundNatRules - Read only. Outbound rules URIs that use this frontend IP. 8653 OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"` 8654 // LoadBalancingRules - Gets load balancing rules URIs that use this frontend IP. 8655 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 8656 // PrivateIPAddress - The private IP address of the IP configuration. 8657 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 8658 // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 8659 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 8660 // Subnet - The reference of the subnet resource. 8661 Subnet *Subnet `json:"subnet,omitempty"` 8662 // PublicIPAddress - The reference of the Public IP resource. 8663 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 8664 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 8665 ProvisioningState *string `json:"provisioningState,omitempty"` 8666} 8667 8668// GatewayRoute gateway routing details 8669type GatewayRoute struct { 8670 // LocalAddress - The gateway's local address 8671 LocalAddress *string `json:"localAddress,omitempty"` 8672 // NetworkProperty - The route's network prefix 8673 NetworkProperty *string `json:"network,omitempty"` 8674 // NextHop - The route's next hop 8675 NextHop *string `json:"nextHop,omitempty"` 8676 // SourcePeer - The peer this route was learned from 8677 SourcePeer *string `json:"sourcePeer,omitempty"` 8678 // Origin - The source this route was learned from 8679 Origin *string `json:"origin,omitempty"` 8680 // AsPath - The route's AS path sequence 8681 AsPath *string `json:"asPath,omitempty"` 8682 // Weight - The route's weight 8683 Weight *int32 `json:"weight,omitempty"` 8684} 8685 8686// GatewayRouteListResult list of virtual network gateway routes 8687type GatewayRouteListResult struct { 8688 autorest.Response `json:"-"` 8689 // Value - List of gateway routes 8690 Value *[]GatewayRoute `json:"value,omitempty"` 8691} 8692 8693// HTTPConfiguration HTTP configuration of the connectivity check. 8694type HTTPConfiguration struct { 8695 // Method - HTTP method. Possible values include: 'Get' 8696 Method HTTPMethod `json:"method,omitempty"` 8697 // Headers - List of HTTP headers. 8698 Headers *[]HTTPHeader `json:"headers,omitempty"` 8699 // ValidStatusCodes - Valid status codes. 8700 ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` 8701} 8702 8703// HTTPHeader describes the HTTP header. 8704type HTTPHeader struct { 8705 // Name - The name in HTTP header. 8706 Name *string `json:"name,omitempty"` 8707 // Value - The value in HTTP header. 8708 Value *string `json:"value,omitempty"` 8709} 8710 8711// InboundNatPool inbound NAT pool of the load balancer. 8712type InboundNatPool struct { 8713 // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. 8714 *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` 8715 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 8716 Name *string `json:"name,omitempty"` 8717 // Etag - A unique read-only string that changes whenever the resource is updated. 8718 Etag *string `json:"etag,omitempty"` 8719 // ID - Resource ID. 8720 ID *string `json:"id,omitempty"` 8721} 8722 8723// MarshalJSON is the custom marshaler for InboundNatPool. 8724func (inp InboundNatPool) MarshalJSON() ([]byte, error) { 8725 objectMap := make(map[string]interface{}) 8726 if inp.InboundNatPoolPropertiesFormat != nil { 8727 objectMap["properties"] = inp.InboundNatPoolPropertiesFormat 8728 } 8729 if inp.Name != nil { 8730 objectMap["name"] = inp.Name 8731 } 8732 if inp.Etag != nil { 8733 objectMap["etag"] = inp.Etag 8734 } 8735 if inp.ID != nil { 8736 objectMap["id"] = inp.ID 8737 } 8738 return json.Marshal(objectMap) 8739} 8740 8741// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. 8742func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { 8743 var m map[string]*json.RawMessage 8744 err := json.Unmarshal(body, &m) 8745 if err != nil { 8746 return err 8747 } 8748 for k, v := range m { 8749 switch k { 8750 case "properties": 8751 if v != nil { 8752 var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat 8753 err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) 8754 if err != nil { 8755 return err 8756 } 8757 inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat 8758 } 8759 case "name": 8760 if v != nil { 8761 var name string 8762 err = json.Unmarshal(*v, &name) 8763 if err != nil { 8764 return err 8765 } 8766 inp.Name = &name 8767 } 8768 case "etag": 8769 if v != nil { 8770 var etag string 8771 err = json.Unmarshal(*v, &etag) 8772 if err != nil { 8773 return err 8774 } 8775 inp.Etag = &etag 8776 } 8777 case "id": 8778 if v != nil { 8779 var ID string 8780 err = json.Unmarshal(*v, &ID) 8781 if err != nil { 8782 return err 8783 } 8784 inp.ID = &ID 8785 } 8786 } 8787 } 8788 8789 return nil 8790} 8791 8792// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. 8793type InboundNatPoolPropertiesFormat struct { 8794 // FrontendIPConfiguration - A reference to frontend IP addresses. 8795 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 8796 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 8797 Protocol TransportProtocol `json:"protocol,omitempty"` 8798 // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. 8799 FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` 8800 // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. 8801 FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` 8802 // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. 8803 BackendPort *int32 `json:"backendPort,omitempty"` 8804 // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. 8805 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 8806 // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. 8807 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 8808 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 8809 ProvisioningState *string `json:"provisioningState,omitempty"` 8810} 8811 8812// InboundNatRule inbound NAT rule of the load balancer. 8813type InboundNatRule struct { 8814 autorest.Response `json:"-"` 8815 // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. 8816 *InboundNatRulePropertiesFormat `json:"properties,omitempty"` 8817 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 8818 Name *string `json:"name,omitempty"` 8819 // Etag - A unique read-only string that changes whenever the resource is updated. 8820 Etag *string `json:"etag,omitempty"` 8821 // ID - Resource ID. 8822 ID *string `json:"id,omitempty"` 8823} 8824 8825// MarshalJSON is the custom marshaler for InboundNatRule. 8826func (inr InboundNatRule) MarshalJSON() ([]byte, error) { 8827 objectMap := make(map[string]interface{}) 8828 if inr.InboundNatRulePropertiesFormat != nil { 8829 objectMap["properties"] = inr.InboundNatRulePropertiesFormat 8830 } 8831 if inr.Name != nil { 8832 objectMap["name"] = inr.Name 8833 } 8834 if inr.Etag != nil { 8835 objectMap["etag"] = inr.Etag 8836 } 8837 if inr.ID != nil { 8838 objectMap["id"] = inr.ID 8839 } 8840 return json.Marshal(objectMap) 8841} 8842 8843// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. 8844func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { 8845 var m map[string]*json.RawMessage 8846 err := json.Unmarshal(body, &m) 8847 if err != nil { 8848 return err 8849 } 8850 for k, v := range m { 8851 switch k { 8852 case "properties": 8853 if v != nil { 8854 var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat 8855 err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) 8856 if err != nil { 8857 return err 8858 } 8859 inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat 8860 } 8861 case "name": 8862 if v != nil { 8863 var name string 8864 err = json.Unmarshal(*v, &name) 8865 if err != nil { 8866 return err 8867 } 8868 inr.Name = &name 8869 } 8870 case "etag": 8871 if v != nil { 8872 var etag string 8873 err = json.Unmarshal(*v, &etag) 8874 if err != nil { 8875 return err 8876 } 8877 inr.Etag = &etag 8878 } 8879 case "id": 8880 if v != nil { 8881 var ID string 8882 err = json.Unmarshal(*v, &ID) 8883 if err != nil { 8884 return err 8885 } 8886 inr.ID = &ID 8887 } 8888 } 8889 } 8890 8891 return nil 8892} 8893 8894// InboundNatRuleListResult response for ListInboundNatRule API service call. 8895type InboundNatRuleListResult struct { 8896 autorest.Response `json:"-"` 8897 // Value - A list of inbound nat rules in a load balancer. 8898 Value *[]InboundNatRule `json:"value,omitempty"` 8899 // NextLink - The URL to get the next set of results. 8900 NextLink *string `json:"nextLink,omitempty"` 8901} 8902 8903// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. 8904type InboundNatRuleListResultIterator struct { 8905 i int 8906 page InboundNatRuleListResultPage 8907} 8908 8909// Next advances to the next value. If there was an error making 8910// the request the iterator does not advance and the error is returned. 8911func (iter *InboundNatRuleListResultIterator) Next() error { 8912 iter.i++ 8913 if iter.i < len(iter.page.Values()) { 8914 return nil 8915 } 8916 err := iter.page.Next() 8917 if err != nil { 8918 iter.i-- 8919 return err 8920 } 8921 iter.i = 0 8922 return nil 8923} 8924 8925// NotDone returns true if the enumeration should be started or is not yet complete. 8926func (iter InboundNatRuleListResultIterator) NotDone() bool { 8927 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8928} 8929 8930// Response returns the raw server response from the last page request. 8931func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { 8932 return iter.page.Response() 8933} 8934 8935// Value returns the current value or a zero-initialized value if the 8936// iterator has advanced beyond the end of the collection. 8937func (iter InboundNatRuleListResultIterator) Value() InboundNatRule { 8938 if !iter.page.NotDone() { 8939 return InboundNatRule{} 8940 } 8941 return iter.page.Values()[iter.i] 8942} 8943 8944// IsEmpty returns true if the ListResult contains no values. 8945func (inrlr InboundNatRuleListResult) IsEmpty() bool { 8946 return inrlr.Value == nil || len(*inrlr.Value) == 0 8947} 8948 8949// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. 8950// It returns nil if no more results exist. 8951func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.Request, error) { 8952 if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { 8953 return nil, nil 8954 } 8955 return autorest.Prepare(&http.Request{}, 8956 autorest.AsJSON(), 8957 autorest.AsGet(), 8958 autorest.WithBaseURL(to.String(inrlr.NextLink))) 8959} 8960 8961// InboundNatRuleListResultPage contains a page of InboundNatRule values. 8962type InboundNatRuleListResultPage struct { 8963 fn func(InboundNatRuleListResult) (InboundNatRuleListResult, error) 8964 inrlr InboundNatRuleListResult 8965} 8966 8967// Next advances to the next page of values. If there was an error making 8968// the request the page does not advance and the error is returned. 8969func (page *InboundNatRuleListResultPage) Next() error { 8970 next, err := page.fn(page.inrlr) 8971 if err != nil { 8972 return err 8973 } 8974 page.inrlr = next 8975 return nil 8976} 8977 8978// NotDone returns true if the page enumeration should be started or is not yet complete. 8979func (page InboundNatRuleListResultPage) NotDone() bool { 8980 return !page.inrlr.IsEmpty() 8981} 8982 8983// Response returns the raw server response from the last page request. 8984func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { 8985 return page.inrlr 8986} 8987 8988// Values returns the slice of values for the current page or nil if there are no values. 8989func (page InboundNatRuleListResultPage) Values() []InboundNatRule { 8990 if page.inrlr.IsEmpty() { 8991 return nil 8992 } 8993 return *page.inrlr.Value 8994} 8995 8996// InboundNatRulePropertiesFormat properties of the inbound NAT rule. 8997type InboundNatRulePropertiesFormat struct { 8998 // FrontendIPConfiguration - A reference to frontend IP addresses. 8999 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 9000 // BackendIPConfiguration - A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. 9001 BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` 9002 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 9003 Protocol TransportProtocol `json:"protocol,omitempty"` 9004 // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. 9005 FrontendPort *int32 `json:"frontendPort,omitempty"` 9006 // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. 9007 BackendPort *int32 `json:"backendPort,omitempty"` 9008 // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. 9009 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 9010 // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. 9011 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 9012 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9013 ProvisioningState *string `json:"provisioningState,omitempty"` 9014} 9015 9016// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 9017// operation. 9018type InboundNatRulesCreateOrUpdateFuture struct { 9019 azure.Future 9020 req *http.Request 9021} 9022 9023// Result returns the result of the asynchronous operation. 9024// If the operation has not completed it will return an error. 9025func (future InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { 9026 var done bool 9027 done, err = future.Done(client) 9028 if err != nil { 9029 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 9030 return 9031 } 9032 if !done { 9033 return inr, azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") 9034 } 9035 if future.PollingMethod() == azure.PollingLocation { 9036 inr, err = client.CreateOrUpdateResponder(future.Response()) 9037 if err != nil { 9038 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 9039 } 9040 return 9041 } 9042 var req *http.Request 9043 var resp *http.Response 9044 if future.PollingURL() != "" { 9045 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9046 if err != nil { 9047 return 9048 } 9049 } else { 9050 req = autorest.ChangeToGet(future.req) 9051 } 9052 resp, err = autorest.SendWithSender(client, req, 9053 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9054 if err != nil { 9055 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 9056 return 9057 } 9058 inr, err = client.CreateOrUpdateResponder(resp) 9059 if err != nil { 9060 err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 9061 } 9062 return 9063} 9064 9065// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 9066// operation. 9067type InboundNatRulesDeleteFuture struct { 9068 azure.Future 9069 req *http.Request 9070} 9071 9072// Result returns the result of the asynchronous operation. 9073// If the operation has not completed it will return an error. 9074func (future InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { 9075 var done bool 9076 done, err = future.Done(client) 9077 if err != nil { 9078 err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") 9079 return 9080 } 9081 if !done { 9082 return ar, azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") 9083 } 9084 if future.PollingMethod() == azure.PollingLocation { 9085 ar, err = client.DeleteResponder(future.Response()) 9086 if err != nil { 9087 err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Failure responding to request") 9088 } 9089 return 9090 } 9091 var req *http.Request 9092 var resp *http.Response 9093 if future.PollingURL() != "" { 9094 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9095 if err != nil { 9096 return 9097 } 9098 } else { 9099 req = autorest.ChangeToGet(future.req) 9100 } 9101 resp, err = autorest.SendWithSender(client, req, 9102 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9103 if err != nil { 9104 err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure sending request") 9105 return 9106 } 9107 ar, err = client.DeleteResponder(resp) 9108 if err != nil { 9109 err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", resp, "Failure responding to request") 9110 } 9111 return 9112} 9113 9114// Interface a network interface in a resource group. 9115type Interface struct { 9116 autorest.Response `json:"-"` 9117 // InterfacePropertiesFormat - Properties of the network interface. 9118 *InterfacePropertiesFormat `json:"properties,omitempty"` 9119 // Etag - A unique read-only string that changes whenever the resource is updated. 9120 Etag *string `json:"etag,omitempty"` 9121 // ID - Resource ID. 9122 ID *string `json:"id,omitempty"` 9123 // Name - Resource name. 9124 Name *string `json:"name,omitempty"` 9125 // Type - Resource type. 9126 Type *string `json:"type,omitempty"` 9127 // Location - Resource location. 9128 Location *string `json:"location,omitempty"` 9129 // Tags - Resource tags. 9130 Tags map[string]*string `json:"tags"` 9131} 9132 9133// MarshalJSON is the custom marshaler for Interface. 9134func (i Interface) MarshalJSON() ([]byte, error) { 9135 objectMap := make(map[string]interface{}) 9136 if i.InterfacePropertiesFormat != nil { 9137 objectMap["properties"] = i.InterfacePropertiesFormat 9138 } 9139 if i.Etag != nil { 9140 objectMap["etag"] = i.Etag 9141 } 9142 if i.ID != nil { 9143 objectMap["id"] = i.ID 9144 } 9145 if i.Name != nil { 9146 objectMap["name"] = i.Name 9147 } 9148 if i.Type != nil { 9149 objectMap["type"] = i.Type 9150 } 9151 if i.Location != nil { 9152 objectMap["location"] = i.Location 9153 } 9154 if i.Tags != nil { 9155 objectMap["tags"] = i.Tags 9156 } 9157 return json.Marshal(objectMap) 9158} 9159 9160// UnmarshalJSON is the custom unmarshaler for Interface struct. 9161func (i *Interface) UnmarshalJSON(body []byte) error { 9162 var m map[string]*json.RawMessage 9163 err := json.Unmarshal(body, &m) 9164 if err != nil { 9165 return err 9166 } 9167 for k, v := range m { 9168 switch k { 9169 case "properties": 9170 if v != nil { 9171 var interfacePropertiesFormat InterfacePropertiesFormat 9172 err = json.Unmarshal(*v, &interfacePropertiesFormat) 9173 if err != nil { 9174 return err 9175 } 9176 i.InterfacePropertiesFormat = &interfacePropertiesFormat 9177 } 9178 case "etag": 9179 if v != nil { 9180 var etag string 9181 err = json.Unmarshal(*v, &etag) 9182 if err != nil { 9183 return err 9184 } 9185 i.Etag = &etag 9186 } 9187 case "id": 9188 if v != nil { 9189 var ID string 9190 err = json.Unmarshal(*v, &ID) 9191 if err != nil { 9192 return err 9193 } 9194 i.ID = &ID 9195 } 9196 case "name": 9197 if v != nil { 9198 var name string 9199 err = json.Unmarshal(*v, &name) 9200 if err != nil { 9201 return err 9202 } 9203 i.Name = &name 9204 } 9205 case "type": 9206 if v != nil { 9207 var typeVar string 9208 err = json.Unmarshal(*v, &typeVar) 9209 if err != nil { 9210 return err 9211 } 9212 i.Type = &typeVar 9213 } 9214 case "location": 9215 if v != nil { 9216 var location string 9217 err = json.Unmarshal(*v, &location) 9218 if err != nil { 9219 return err 9220 } 9221 i.Location = &location 9222 } 9223 case "tags": 9224 if v != nil { 9225 var tags map[string]*string 9226 err = json.Unmarshal(*v, &tags) 9227 if err != nil { 9228 return err 9229 } 9230 i.Tags = tags 9231 } 9232 } 9233 } 9234 9235 return nil 9236} 9237 9238// InterfaceAssociation network interface and its custom security rules. 9239type InterfaceAssociation struct { 9240 // ID - Network interface ID. 9241 ID *string `json:"id,omitempty"` 9242 // SecurityRules - Collection of custom security rules. 9243 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 9244} 9245 9246// InterfaceDNSSettings DNS settings of a network interface. 9247type InterfaceDNSSettings struct { 9248 // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. 9249 DNSServers *[]string `json:"dnsServers,omitempty"` 9250 // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. 9251 AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` 9252 // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. 9253 InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` 9254 // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. 9255 InternalFqdn *string `json:"internalFqdn,omitempty"` 9256 // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. 9257 InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` 9258} 9259 9260// InterfaceIPConfiguration iPConfiguration in a network interface. 9261type InterfaceIPConfiguration struct { 9262 autorest.Response `json:"-"` 9263 // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. 9264 *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` 9265 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 9266 Name *string `json:"name,omitempty"` 9267 // Etag - A unique read-only string that changes whenever the resource is updated. 9268 Etag *string `json:"etag,omitempty"` 9269 // ID - Resource ID. 9270 ID *string `json:"id,omitempty"` 9271} 9272 9273// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. 9274func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { 9275 objectMap := make(map[string]interface{}) 9276 if iic.InterfaceIPConfigurationPropertiesFormat != nil { 9277 objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat 9278 } 9279 if iic.Name != nil { 9280 objectMap["name"] = iic.Name 9281 } 9282 if iic.Etag != nil { 9283 objectMap["etag"] = iic.Etag 9284 } 9285 if iic.ID != nil { 9286 objectMap["id"] = iic.ID 9287 } 9288 return json.Marshal(objectMap) 9289} 9290 9291// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. 9292func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { 9293 var m map[string]*json.RawMessage 9294 err := json.Unmarshal(body, &m) 9295 if err != nil { 9296 return err 9297 } 9298 for k, v := range m { 9299 switch k { 9300 case "properties": 9301 if v != nil { 9302 var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat 9303 err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) 9304 if err != nil { 9305 return err 9306 } 9307 iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat 9308 } 9309 case "name": 9310 if v != nil { 9311 var name string 9312 err = json.Unmarshal(*v, &name) 9313 if err != nil { 9314 return err 9315 } 9316 iic.Name = &name 9317 } 9318 case "etag": 9319 if v != nil { 9320 var etag string 9321 err = json.Unmarshal(*v, &etag) 9322 if err != nil { 9323 return err 9324 } 9325 iic.Etag = &etag 9326 } 9327 case "id": 9328 if v != nil { 9329 var ID string 9330 err = json.Unmarshal(*v, &ID) 9331 if err != nil { 9332 return err 9333 } 9334 iic.ID = &ID 9335 } 9336 } 9337 } 9338 9339 return nil 9340} 9341 9342// InterfaceIPConfigurationListResult response for list ip configurations API service call. 9343type InterfaceIPConfigurationListResult struct { 9344 autorest.Response `json:"-"` 9345 // Value - A list of ip configurations. 9346 Value *[]InterfaceIPConfiguration `json:"value,omitempty"` 9347 // NextLink - The URL to get the next set of results. 9348 NextLink *string `json:"nextLink,omitempty"` 9349} 9350 9351// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration 9352// values. 9353type InterfaceIPConfigurationListResultIterator struct { 9354 i int 9355 page InterfaceIPConfigurationListResultPage 9356} 9357 9358// Next advances to the next value. If there was an error making 9359// the request the iterator does not advance and the error is returned. 9360func (iter *InterfaceIPConfigurationListResultIterator) Next() error { 9361 iter.i++ 9362 if iter.i < len(iter.page.Values()) { 9363 return nil 9364 } 9365 err := iter.page.Next() 9366 if err != nil { 9367 iter.i-- 9368 return err 9369 } 9370 iter.i = 0 9371 return nil 9372} 9373 9374// NotDone returns true if the enumeration should be started or is not yet complete. 9375func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool { 9376 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9377} 9378 9379// Response returns the raw server response from the last page request. 9380func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { 9381 return iter.page.Response() 9382} 9383 9384// Value returns the current value or a zero-initialized value if the 9385// iterator has advanced beyond the end of the collection. 9386func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { 9387 if !iter.page.NotDone() { 9388 return InterfaceIPConfiguration{} 9389 } 9390 return iter.page.Values()[iter.i] 9391} 9392 9393// IsEmpty returns true if the ListResult contains no values. 9394func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { 9395 return iiclr.Value == nil || len(*iiclr.Value) == 0 9396} 9397 9398// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. 9399// It returns nil if no more results exist. 9400func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer() (*http.Request, error) { 9401 if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { 9402 return nil, nil 9403 } 9404 return autorest.Prepare(&http.Request{}, 9405 autorest.AsJSON(), 9406 autorest.AsGet(), 9407 autorest.WithBaseURL(to.String(iiclr.NextLink))) 9408} 9409 9410// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. 9411type InterfaceIPConfigurationListResultPage struct { 9412 fn func(InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) 9413 iiclr InterfaceIPConfigurationListResult 9414} 9415 9416// Next advances to the next page of values. If there was an error making 9417// the request the page does not advance and the error is returned. 9418func (page *InterfaceIPConfigurationListResultPage) Next() error { 9419 next, err := page.fn(page.iiclr) 9420 if err != nil { 9421 return err 9422 } 9423 page.iiclr = next 9424 return nil 9425} 9426 9427// NotDone returns true if the page enumeration should be started or is not yet complete. 9428func (page InterfaceIPConfigurationListResultPage) NotDone() bool { 9429 return !page.iiclr.IsEmpty() 9430} 9431 9432// Response returns the raw server response from the last page request. 9433func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { 9434 return page.iiclr 9435} 9436 9437// Values returns the slice of values for the current page or nil if there are no values. 9438func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { 9439 if page.iiclr.IsEmpty() { 9440 return nil 9441 } 9442 return *page.iiclr.Value 9443} 9444 9445// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. 9446type InterfaceIPConfigurationPropertiesFormat struct { 9447 // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. 9448 ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` 9449 // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. 9450 LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` 9451 // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. 9452 LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` 9453 // PrivateIPAddress - Private IP address of the IP configuration. 9454 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 9455 // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 9456 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 9457 // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 9458 PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` 9459 // Subnet - Subnet bound to the IP configuration. 9460 Subnet *Subnet `json:"subnet,omitempty"` 9461 // Primary - Gets whether this is a primary customer address on the network interface. 9462 Primary *bool `json:"primary,omitempty"` 9463 // PublicIPAddress - Public IP address bound to the IP configuration. 9464 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 9465 // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. 9466 ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` 9467 // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9468 ProvisioningState *string `json:"provisioningState,omitempty"` 9469} 9470 9471// InterfaceListResult response for the ListNetworkInterface API service call. 9472type InterfaceListResult struct { 9473 autorest.Response `json:"-"` 9474 // Value - A list of network interfaces in a resource group. 9475 Value *[]Interface `json:"value,omitempty"` 9476 // NextLink - The URL to get the next set of results. 9477 NextLink *string `json:"nextLink,omitempty"` 9478} 9479 9480// InterfaceListResultIterator provides access to a complete listing of Interface values. 9481type InterfaceListResultIterator struct { 9482 i int 9483 page InterfaceListResultPage 9484} 9485 9486// Next advances to the next value. If there was an error making 9487// the request the iterator does not advance and the error is returned. 9488func (iter *InterfaceListResultIterator) Next() error { 9489 iter.i++ 9490 if iter.i < len(iter.page.Values()) { 9491 return nil 9492 } 9493 err := iter.page.Next() 9494 if err != nil { 9495 iter.i-- 9496 return err 9497 } 9498 iter.i = 0 9499 return nil 9500} 9501 9502// NotDone returns true if the enumeration should be started or is not yet complete. 9503func (iter InterfaceListResultIterator) NotDone() bool { 9504 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9505} 9506 9507// Response returns the raw server response from the last page request. 9508func (iter InterfaceListResultIterator) Response() InterfaceListResult { 9509 return iter.page.Response() 9510} 9511 9512// Value returns the current value or a zero-initialized value if the 9513// iterator has advanced beyond the end of the collection. 9514func (iter InterfaceListResultIterator) Value() Interface { 9515 if !iter.page.NotDone() { 9516 return Interface{} 9517 } 9518 return iter.page.Values()[iter.i] 9519} 9520 9521// IsEmpty returns true if the ListResult contains no values. 9522func (ilr InterfaceListResult) IsEmpty() bool { 9523 return ilr.Value == nil || len(*ilr.Value) == 0 9524} 9525 9526// interfaceListResultPreparer prepares a request to retrieve the next set of results. 9527// It returns nil if no more results exist. 9528func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) { 9529 if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { 9530 return nil, nil 9531 } 9532 return autorest.Prepare(&http.Request{}, 9533 autorest.AsJSON(), 9534 autorest.AsGet(), 9535 autorest.WithBaseURL(to.String(ilr.NextLink))) 9536} 9537 9538// InterfaceListResultPage contains a page of Interface values. 9539type InterfaceListResultPage struct { 9540 fn func(InterfaceListResult) (InterfaceListResult, error) 9541 ilr InterfaceListResult 9542} 9543 9544// Next advances to the next page of values. If there was an error making 9545// the request the page does not advance and the error is returned. 9546func (page *InterfaceListResultPage) Next() error { 9547 next, err := page.fn(page.ilr) 9548 if err != nil { 9549 return err 9550 } 9551 page.ilr = next 9552 return nil 9553} 9554 9555// NotDone returns true if the page enumeration should be started or is not yet complete. 9556func (page InterfaceListResultPage) NotDone() bool { 9557 return !page.ilr.IsEmpty() 9558} 9559 9560// Response returns the raw server response from the last page request. 9561func (page InterfaceListResultPage) Response() InterfaceListResult { 9562 return page.ilr 9563} 9564 9565// Values returns the slice of values for the current page or nil if there are no values. 9566func (page InterfaceListResultPage) Values() []Interface { 9567 if page.ilr.IsEmpty() { 9568 return nil 9569 } 9570 return *page.ilr.Value 9571} 9572 9573// InterfaceLoadBalancerListResult response for list ip configurations API service call. 9574type InterfaceLoadBalancerListResult struct { 9575 autorest.Response `json:"-"` 9576 // Value - A list of load balancers. 9577 Value *[]LoadBalancer `json:"value,omitempty"` 9578 // NextLink - The URL to get the next set of results. 9579 NextLink *string `json:"nextLink,omitempty"` 9580} 9581 9582// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. 9583type InterfaceLoadBalancerListResultIterator struct { 9584 i int 9585 page InterfaceLoadBalancerListResultPage 9586} 9587 9588// Next advances to the next value. If there was an error making 9589// the request the iterator does not advance and the error is returned. 9590func (iter *InterfaceLoadBalancerListResultIterator) Next() error { 9591 iter.i++ 9592 if iter.i < len(iter.page.Values()) { 9593 return nil 9594 } 9595 err := iter.page.Next() 9596 if err != nil { 9597 iter.i-- 9598 return err 9599 } 9600 iter.i = 0 9601 return nil 9602} 9603 9604// NotDone returns true if the enumeration should be started or is not yet complete. 9605func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool { 9606 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9607} 9608 9609// Response returns the raw server response from the last page request. 9610func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { 9611 return iter.page.Response() 9612} 9613 9614// Value returns the current value or a zero-initialized value if the 9615// iterator has advanced beyond the end of the collection. 9616func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { 9617 if !iter.page.NotDone() { 9618 return LoadBalancer{} 9619 } 9620 return iter.page.Values()[iter.i] 9621} 9622 9623// IsEmpty returns true if the ListResult contains no values. 9624func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { 9625 return ilblr.Value == nil || len(*ilblr.Value) == 0 9626} 9627 9628// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. 9629// It returns nil if no more results exist. 9630func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer() (*http.Request, error) { 9631 if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { 9632 return nil, nil 9633 } 9634 return autorest.Prepare(&http.Request{}, 9635 autorest.AsJSON(), 9636 autorest.AsGet(), 9637 autorest.WithBaseURL(to.String(ilblr.NextLink))) 9638} 9639 9640// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. 9641type InterfaceLoadBalancerListResultPage struct { 9642 fn func(InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) 9643 ilblr InterfaceLoadBalancerListResult 9644} 9645 9646// Next advances to the next page of values. If there was an error making 9647// the request the page does not advance and the error is returned. 9648func (page *InterfaceLoadBalancerListResultPage) Next() error { 9649 next, err := page.fn(page.ilblr) 9650 if err != nil { 9651 return err 9652 } 9653 page.ilblr = next 9654 return nil 9655} 9656 9657// NotDone returns true if the page enumeration should be started or is not yet complete. 9658func (page InterfaceLoadBalancerListResultPage) NotDone() bool { 9659 return !page.ilblr.IsEmpty() 9660} 9661 9662// Response returns the raw server response from the last page request. 9663func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { 9664 return page.ilblr 9665} 9666 9667// Values returns the slice of values for the current page or nil if there are no values. 9668func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { 9669 if page.ilblr.IsEmpty() { 9670 return nil 9671 } 9672 return *page.ilblr.Value 9673} 9674 9675// InterfacePropertiesFormat networkInterface properties. 9676type InterfacePropertiesFormat struct { 9677 // VirtualMachine - The reference of a virtual machine. 9678 VirtualMachine *SubResource `json:"virtualMachine,omitempty"` 9679 // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. 9680 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 9681 // IPConfigurations - A list of IPConfigurations of the network interface. 9682 IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` 9683 // DNSSettings - The DNS settings in network interface. 9684 DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` 9685 // MacAddress - The MAC address of the network interface. 9686 MacAddress *string `json:"macAddress,omitempty"` 9687 // Primary - Gets whether this is a primary network interface on a virtual machine. 9688 Primary *bool `json:"primary,omitempty"` 9689 // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. 9690 EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` 9691 // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. 9692 EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` 9693 // ResourceGUID - The resource GUID property of the network interface resource. 9694 ResourceGUID *string `json:"resourceGuid,omitempty"` 9695 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 9696 ProvisioningState *string `json:"provisioningState,omitempty"` 9697} 9698 9699// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 9700// operation. 9701type InterfacesCreateOrUpdateFuture struct { 9702 azure.Future 9703 req *http.Request 9704} 9705 9706// Result returns the result of the asynchronous operation. 9707// If the operation has not completed it will return an error. 9708func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { 9709 var done bool 9710 done, err = future.Done(client) 9711 if err != nil { 9712 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 9713 return 9714 } 9715 if !done { 9716 return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") 9717 } 9718 if future.PollingMethod() == azure.PollingLocation { 9719 i, err = client.CreateOrUpdateResponder(future.Response()) 9720 if err != nil { 9721 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 9722 } 9723 return 9724 } 9725 var req *http.Request 9726 var resp *http.Response 9727 if future.PollingURL() != "" { 9728 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9729 if err != nil { 9730 return 9731 } 9732 } else { 9733 req = autorest.ChangeToGet(future.req) 9734 } 9735 resp, err = autorest.SendWithSender(client, req, 9736 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9737 if err != nil { 9738 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 9739 return 9740 } 9741 i, err = client.CreateOrUpdateResponder(resp) 9742 if err != nil { 9743 err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 9744 } 9745 return 9746} 9747 9748// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 9749type InterfacesDeleteFuture struct { 9750 azure.Future 9751 req *http.Request 9752} 9753 9754// Result returns the result of the asynchronous operation. 9755// If the operation has not completed it will return an error. 9756func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { 9757 var done bool 9758 done, err = future.Done(client) 9759 if err != nil { 9760 err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") 9761 return 9762 } 9763 if !done { 9764 return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") 9765 } 9766 if future.PollingMethod() == azure.PollingLocation { 9767 ar, err = client.DeleteResponder(future.Response()) 9768 if err != nil { 9769 err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request") 9770 } 9771 return 9772 } 9773 var req *http.Request 9774 var resp *http.Response 9775 if future.PollingURL() != "" { 9776 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9777 if err != nil { 9778 return 9779 } 9780 } else { 9781 req = autorest.ChangeToGet(future.req) 9782 } 9783 resp, err = autorest.SendWithSender(client, req, 9784 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9785 if err != nil { 9786 err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request") 9787 return 9788 } 9789 ar, err = client.DeleteResponder(resp) 9790 if err != nil { 9791 err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request") 9792 } 9793 return 9794} 9795 9796// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a 9797// long-running operation. 9798type InterfacesGetEffectiveRouteTableFuture struct { 9799 azure.Future 9800 req *http.Request 9801} 9802 9803// Result returns the result of the asynchronous operation. 9804// If the operation has not completed it will return an error. 9805func (future InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { 9806 var done bool 9807 done, err = future.Done(client) 9808 if err != nil { 9809 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") 9810 return 9811 } 9812 if !done { 9813 return erlr, azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") 9814 } 9815 if future.PollingMethod() == azure.PollingLocation { 9816 erlr, err = client.GetEffectiveRouteTableResponder(future.Response()) 9817 if err != nil { 9818 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Failure responding to request") 9819 } 9820 return 9821 } 9822 var req *http.Request 9823 var resp *http.Response 9824 if future.PollingURL() != "" { 9825 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9826 if err != nil { 9827 return 9828 } 9829 } else { 9830 req = autorest.ChangeToGet(future.req) 9831 } 9832 resp, err = autorest.SendWithSender(client, req, 9833 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9834 if err != nil { 9835 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure sending request") 9836 return 9837 } 9838 erlr, err = client.GetEffectiveRouteTableResponder(resp) 9839 if err != nil { 9840 err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", resp, "Failure responding to request") 9841 } 9842 return 9843} 9844 9845// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results of a 9846// long-running operation. 9847type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { 9848 azure.Future 9849 req *http.Request 9850} 9851 9852// Result returns the result of the asynchronous operation. 9853// If the operation has not completed it will return an error. 9854func (future InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { 9855 var done bool 9856 done, err = future.Done(client) 9857 if err != nil { 9858 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") 9859 return 9860 } 9861 if !done { 9862 return ensglr, azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") 9863 } 9864 if future.PollingMethod() == azure.PollingLocation { 9865 ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(future.Response()) 9866 if err != nil { 9867 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Failure responding to request") 9868 } 9869 return 9870 } 9871 var req *http.Request 9872 var resp *http.Response 9873 if future.PollingURL() != "" { 9874 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9875 if err != nil { 9876 return 9877 } 9878 } else { 9879 req = autorest.ChangeToGet(future.req) 9880 } 9881 resp, err = autorest.SendWithSender(client, req, 9882 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9883 if err != nil { 9884 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure sending request") 9885 return 9886 } 9887 ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(resp) 9888 if err != nil { 9889 err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", resp, "Failure responding to request") 9890 } 9891 return 9892} 9893 9894// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation. 9895type InterfacesUpdateTagsFuture struct { 9896 azure.Future 9897 req *http.Request 9898} 9899 9900// Result returns the result of the asynchronous operation. 9901// If the operation has not completed it will return an error. 9902func (future InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { 9903 var done bool 9904 done, err = future.Done(client) 9905 if err != nil { 9906 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 9907 return 9908 } 9909 if !done { 9910 return i, azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") 9911 } 9912 if future.PollingMethod() == azure.PollingLocation { 9913 i, err = client.UpdateTagsResponder(future.Response()) 9914 if err != nil { 9915 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 9916 } 9917 return 9918 } 9919 var req *http.Request 9920 var resp *http.Response 9921 if future.PollingURL() != "" { 9922 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 9923 if err != nil { 9924 return 9925 } 9926 } else { 9927 req = autorest.ChangeToGet(future.req) 9928 } 9929 resp, err = autorest.SendWithSender(client, req, 9930 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 9931 if err != nil { 9932 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure sending request") 9933 return 9934 } 9935 i, err = client.UpdateTagsResponder(resp) 9936 if err != nil { 9937 err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", resp, "Failure responding to request") 9938 } 9939 return 9940} 9941 9942// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call 9943type IPAddressAvailabilityResult struct { 9944 autorest.Response `json:"-"` 9945 // Available - Private IP address availability. 9946 Available *bool `json:"available,omitempty"` 9947 // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. 9948 AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` 9949} 9950 9951// IPConfiguration IP configuration 9952type IPConfiguration struct { 9953 // IPConfigurationPropertiesFormat - Properties of the IP configuration 9954 *IPConfigurationPropertiesFormat `json:"properties,omitempty"` 9955 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 9956 Name *string `json:"name,omitempty"` 9957 // Etag - A unique read-only string that changes whenever the resource is updated. 9958 Etag *string `json:"etag,omitempty"` 9959 // ID - Resource ID. 9960 ID *string `json:"id,omitempty"` 9961} 9962 9963// MarshalJSON is the custom marshaler for IPConfiguration. 9964func (ic IPConfiguration) MarshalJSON() ([]byte, error) { 9965 objectMap := make(map[string]interface{}) 9966 if ic.IPConfigurationPropertiesFormat != nil { 9967 objectMap["properties"] = ic.IPConfigurationPropertiesFormat 9968 } 9969 if ic.Name != nil { 9970 objectMap["name"] = ic.Name 9971 } 9972 if ic.Etag != nil { 9973 objectMap["etag"] = ic.Etag 9974 } 9975 if ic.ID != nil { 9976 objectMap["id"] = ic.ID 9977 } 9978 return json.Marshal(objectMap) 9979} 9980 9981// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. 9982func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { 9983 var m map[string]*json.RawMessage 9984 err := json.Unmarshal(body, &m) 9985 if err != nil { 9986 return err 9987 } 9988 for k, v := range m { 9989 switch k { 9990 case "properties": 9991 if v != nil { 9992 var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat 9993 err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) 9994 if err != nil { 9995 return err 9996 } 9997 ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat 9998 } 9999 case "name": 10000 if v != nil { 10001 var name string 10002 err = json.Unmarshal(*v, &name) 10003 if err != nil { 10004 return err 10005 } 10006 ic.Name = &name 10007 } 10008 case "etag": 10009 if v != nil { 10010 var etag string 10011 err = json.Unmarshal(*v, &etag) 10012 if err != nil { 10013 return err 10014 } 10015 ic.Etag = &etag 10016 } 10017 case "id": 10018 if v != nil { 10019 var ID string 10020 err = json.Unmarshal(*v, &ID) 10021 if err != nil { 10022 return err 10023 } 10024 ic.ID = &ID 10025 } 10026 } 10027 } 10028 10029 return nil 10030} 10031 10032// IPConfigurationPropertiesFormat properties of IP configuration. 10033type IPConfigurationPropertiesFormat struct { 10034 // PrivateIPAddress - The private IP address of the IP configuration. 10035 PrivateIPAddress *string `json:"privateIPAddress,omitempty"` 10036 // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 10037 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 10038 // Subnet - The reference of the subnet resource. 10039 Subnet *Subnet `json:"subnet,omitempty"` 10040 // PublicIPAddress - The reference of the public IP resource. 10041 PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` 10042 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 10043 ProvisioningState *string `json:"provisioningState,omitempty"` 10044} 10045 10046// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection 10047type IpsecPolicy struct { 10048 // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. 10049 SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` 10050 // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. 10051 SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` 10052 // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' 10053 IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` 10054 // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' 10055 IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` 10056 // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' 10057 IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` 10058 // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' 10059 IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` 10060 // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' 10061 DhGroup DhGroup `json:"dhGroup,omitempty"` 10062 // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' 10063 PfsGroup PfsGroup `json:"pfsGroup,omitempty"` 10064} 10065 10066// IPTag contains the IpTag associated with the public IP address 10067type IPTag struct { 10068 // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. 10069 IPTagType *string `json:"ipTagType,omitempty"` 10070 // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc 10071 Tag *string `json:"tag,omitempty"` 10072} 10073 10074// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. 10075type Ipv6ExpressRouteCircuitPeeringConfig struct { 10076 // PrimaryPeerAddressPrefix - The primary address prefix. 10077 PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` 10078 // SecondaryPeerAddressPrefix - The secondary address prefix. 10079 SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` 10080 // MicrosoftPeeringConfig - The Microsoft peering configuration. 10081 MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` 10082 // RouteFilter - The reference of the RouteFilter resource. 10083 RouteFilter *RouteFilter `json:"routeFilter,omitempty"` 10084 // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' 10085 State ExpressRouteCircuitPeeringState `json:"state,omitempty"` 10086} 10087 10088// LoadBalancer loadBalancer resource 10089type LoadBalancer struct { 10090 autorest.Response `json:"-"` 10091 // Sku - The load balancer SKU. 10092 Sku *LoadBalancerSku `json:"sku,omitempty"` 10093 // LoadBalancerPropertiesFormat - Properties of load balancer. 10094 *LoadBalancerPropertiesFormat `json:"properties,omitempty"` 10095 // Etag - A unique read-only string that changes whenever the resource is updated. 10096 Etag *string `json:"etag,omitempty"` 10097 // ID - Resource ID. 10098 ID *string `json:"id,omitempty"` 10099 // Name - Resource name. 10100 Name *string `json:"name,omitempty"` 10101 // Type - Resource type. 10102 Type *string `json:"type,omitempty"` 10103 // Location - Resource location. 10104 Location *string `json:"location,omitempty"` 10105 // Tags - Resource tags. 10106 Tags map[string]*string `json:"tags"` 10107} 10108 10109// MarshalJSON is the custom marshaler for LoadBalancer. 10110func (lb LoadBalancer) MarshalJSON() ([]byte, error) { 10111 objectMap := make(map[string]interface{}) 10112 if lb.Sku != nil { 10113 objectMap["sku"] = lb.Sku 10114 } 10115 if lb.LoadBalancerPropertiesFormat != nil { 10116 objectMap["properties"] = lb.LoadBalancerPropertiesFormat 10117 } 10118 if lb.Etag != nil { 10119 objectMap["etag"] = lb.Etag 10120 } 10121 if lb.ID != nil { 10122 objectMap["id"] = lb.ID 10123 } 10124 if lb.Name != nil { 10125 objectMap["name"] = lb.Name 10126 } 10127 if lb.Type != nil { 10128 objectMap["type"] = lb.Type 10129 } 10130 if lb.Location != nil { 10131 objectMap["location"] = lb.Location 10132 } 10133 if lb.Tags != nil { 10134 objectMap["tags"] = lb.Tags 10135 } 10136 return json.Marshal(objectMap) 10137} 10138 10139// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. 10140func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { 10141 var m map[string]*json.RawMessage 10142 err := json.Unmarshal(body, &m) 10143 if err != nil { 10144 return err 10145 } 10146 for k, v := range m { 10147 switch k { 10148 case "sku": 10149 if v != nil { 10150 var sku LoadBalancerSku 10151 err = json.Unmarshal(*v, &sku) 10152 if err != nil { 10153 return err 10154 } 10155 lb.Sku = &sku 10156 } 10157 case "properties": 10158 if v != nil { 10159 var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat 10160 err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) 10161 if err != nil { 10162 return err 10163 } 10164 lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat 10165 } 10166 case "etag": 10167 if v != nil { 10168 var etag string 10169 err = json.Unmarshal(*v, &etag) 10170 if err != nil { 10171 return err 10172 } 10173 lb.Etag = &etag 10174 } 10175 case "id": 10176 if v != nil { 10177 var ID string 10178 err = json.Unmarshal(*v, &ID) 10179 if err != nil { 10180 return err 10181 } 10182 lb.ID = &ID 10183 } 10184 case "name": 10185 if v != nil { 10186 var name string 10187 err = json.Unmarshal(*v, &name) 10188 if err != nil { 10189 return err 10190 } 10191 lb.Name = &name 10192 } 10193 case "type": 10194 if v != nil { 10195 var typeVar string 10196 err = json.Unmarshal(*v, &typeVar) 10197 if err != nil { 10198 return err 10199 } 10200 lb.Type = &typeVar 10201 } 10202 case "location": 10203 if v != nil { 10204 var location string 10205 err = json.Unmarshal(*v, &location) 10206 if err != nil { 10207 return err 10208 } 10209 lb.Location = &location 10210 } 10211 case "tags": 10212 if v != nil { 10213 var tags map[string]*string 10214 err = json.Unmarshal(*v, &tags) 10215 if err != nil { 10216 return err 10217 } 10218 lb.Tags = tags 10219 } 10220 } 10221 } 10222 10223 return nil 10224} 10225 10226// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. 10227type LoadBalancerBackendAddressPoolListResult struct { 10228 autorest.Response `json:"-"` 10229 // Value - A list of backend address pools in a load balancer. 10230 Value *[]BackendAddressPool `json:"value,omitempty"` 10231 // NextLink - The URL to get the next set of results. 10232 NextLink *string `json:"nextLink,omitempty"` 10233} 10234 10235// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool 10236// values. 10237type LoadBalancerBackendAddressPoolListResultIterator struct { 10238 i int 10239 page LoadBalancerBackendAddressPoolListResultPage 10240} 10241 10242// Next advances to the next value. If there was an error making 10243// the request the iterator does not advance and the error is returned. 10244func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error { 10245 iter.i++ 10246 if iter.i < len(iter.page.Values()) { 10247 return nil 10248 } 10249 err := iter.page.Next() 10250 if err != nil { 10251 iter.i-- 10252 return err 10253 } 10254 iter.i = 0 10255 return nil 10256} 10257 10258// NotDone returns true if the enumeration should be started or is not yet complete. 10259func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { 10260 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10261} 10262 10263// Response returns the raw server response from the last page request. 10264func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { 10265 return iter.page.Response() 10266} 10267 10268// Value returns the current value or a zero-initialized value if the 10269// iterator has advanced beyond the end of the collection. 10270func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { 10271 if !iter.page.NotDone() { 10272 return BackendAddressPool{} 10273 } 10274 return iter.page.Values()[iter.i] 10275} 10276 10277// IsEmpty returns true if the ListResult contains no values. 10278func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { 10279 return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 10280} 10281 10282// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. 10283// It returns nil if no more results exist. 10284func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) { 10285 if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { 10286 return nil, nil 10287 } 10288 return autorest.Prepare(&http.Request{}, 10289 autorest.AsJSON(), 10290 autorest.AsGet(), 10291 autorest.WithBaseURL(to.String(lbbaplr.NextLink))) 10292} 10293 10294// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. 10295type LoadBalancerBackendAddressPoolListResultPage struct { 10296 fn func(LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) 10297 lbbaplr LoadBalancerBackendAddressPoolListResult 10298} 10299 10300// Next advances to the next page of values. If there was an error making 10301// the request the page does not advance and the error is returned. 10302func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error { 10303 next, err := page.fn(page.lbbaplr) 10304 if err != nil { 10305 return err 10306 } 10307 page.lbbaplr = next 10308 return nil 10309} 10310 10311// NotDone returns true if the page enumeration should be started or is not yet complete. 10312func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { 10313 return !page.lbbaplr.IsEmpty() 10314} 10315 10316// Response returns the raw server response from the last page request. 10317func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { 10318 return page.lbbaplr 10319} 10320 10321// Values returns the slice of values for the current page or nil if there are no values. 10322func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { 10323 if page.lbbaplr.IsEmpty() { 10324 return nil 10325 } 10326 return *page.lbbaplr.Value 10327} 10328 10329// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. 10330type LoadBalancerFrontendIPConfigurationListResult struct { 10331 autorest.Response `json:"-"` 10332 // Value - A list of frontend IP configurations in a load balancer. 10333 Value *[]FrontendIPConfiguration `json:"value,omitempty"` 10334 // NextLink - The URL to get the next set of results. 10335 NextLink *string `json:"nextLink,omitempty"` 10336} 10337 10338// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of 10339// FrontendIPConfiguration values. 10340type LoadBalancerFrontendIPConfigurationListResultIterator struct { 10341 i int 10342 page LoadBalancerFrontendIPConfigurationListResultPage 10343} 10344 10345// Next advances to the next value. If there was an error making 10346// the request the iterator does not advance and the error is returned. 10347func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { 10348 iter.i++ 10349 if iter.i < len(iter.page.Values()) { 10350 return nil 10351 } 10352 err := iter.page.Next() 10353 if err != nil { 10354 iter.i-- 10355 return err 10356 } 10357 iter.i = 0 10358 return nil 10359} 10360 10361// NotDone returns true if the enumeration should be started or is not yet complete. 10362func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool { 10363 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10364} 10365 10366// Response returns the raw server response from the last page request. 10367func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { 10368 return iter.page.Response() 10369} 10370 10371// Value returns the current value or a zero-initialized value if the 10372// iterator has advanced beyond the end of the collection. 10373func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { 10374 if !iter.page.NotDone() { 10375 return FrontendIPConfiguration{} 10376 } 10377 return iter.page.Values()[iter.i] 10378} 10379 10380// IsEmpty returns true if the ListResult contains no values. 10381func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { 10382 return lbficlr.Value == nil || len(*lbficlr.Value) == 0 10383} 10384 10385// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. 10386// It returns nil if no more results exist. 10387func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) { 10388 if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { 10389 return nil, nil 10390 } 10391 return autorest.Prepare(&http.Request{}, 10392 autorest.AsJSON(), 10393 autorest.AsGet(), 10394 autorest.WithBaseURL(to.String(lbficlr.NextLink))) 10395} 10396 10397// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. 10398type LoadBalancerFrontendIPConfigurationListResultPage struct { 10399 fn func(LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) 10400 lbficlr LoadBalancerFrontendIPConfigurationListResult 10401} 10402 10403// Next advances to the next page of values. If there was an error making 10404// the request the page does not advance and the error is returned. 10405func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { 10406 next, err := page.fn(page.lbficlr) 10407 if err != nil { 10408 return err 10409 } 10410 page.lbficlr = next 10411 return nil 10412} 10413 10414// NotDone returns true if the page enumeration should be started or is not yet complete. 10415func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { 10416 return !page.lbficlr.IsEmpty() 10417} 10418 10419// Response returns the raw server response from the last page request. 10420func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { 10421 return page.lbficlr 10422} 10423 10424// Values returns the slice of values for the current page or nil if there are no values. 10425func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { 10426 if page.lbficlr.IsEmpty() { 10427 return nil 10428 } 10429 return *page.lbficlr.Value 10430} 10431 10432// LoadBalancerListResult response for ListLoadBalancers API service call. 10433type LoadBalancerListResult struct { 10434 autorest.Response `json:"-"` 10435 // Value - A list of load balancers in a resource group. 10436 Value *[]LoadBalancer `json:"value,omitempty"` 10437 // NextLink - The URL to get the next set of results. 10438 NextLink *string `json:"nextLink,omitempty"` 10439} 10440 10441// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. 10442type LoadBalancerListResultIterator struct { 10443 i int 10444 page LoadBalancerListResultPage 10445} 10446 10447// Next advances to the next value. If there was an error making 10448// the request the iterator does not advance and the error is returned. 10449func (iter *LoadBalancerListResultIterator) Next() error { 10450 iter.i++ 10451 if iter.i < len(iter.page.Values()) { 10452 return nil 10453 } 10454 err := iter.page.Next() 10455 if err != nil { 10456 iter.i-- 10457 return err 10458 } 10459 iter.i = 0 10460 return nil 10461} 10462 10463// NotDone returns true if the enumeration should be started or is not yet complete. 10464func (iter LoadBalancerListResultIterator) NotDone() bool { 10465 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10466} 10467 10468// Response returns the raw server response from the last page request. 10469func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { 10470 return iter.page.Response() 10471} 10472 10473// Value returns the current value or a zero-initialized value if the 10474// iterator has advanced beyond the end of the collection. 10475func (iter LoadBalancerListResultIterator) Value() LoadBalancer { 10476 if !iter.page.NotDone() { 10477 return LoadBalancer{} 10478 } 10479 return iter.page.Values()[iter.i] 10480} 10481 10482// IsEmpty returns true if the ListResult contains no values. 10483func (lblr LoadBalancerListResult) IsEmpty() bool { 10484 return lblr.Value == nil || len(*lblr.Value) == 0 10485} 10486 10487// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. 10488// It returns nil if no more results exist. 10489func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) { 10490 if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { 10491 return nil, nil 10492 } 10493 return autorest.Prepare(&http.Request{}, 10494 autorest.AsJSON(), 10495 autorest.AsGet(), 10496 autorest.WithBaseURL(to.String(lblr.NextLink))) 10497} 10498 10499// LoadBalancerListResultPage contains a page of LoadBalancer values. 10500type LoadBalancerListResultPage struct { 10501 fn func(LoadBalancerListResult) (LoadBalancerListResult, error) 10502 lblr LoadBalancerListResult 10503} 10504 10505// Next advances to the next page of values. If there was an error making 10506// the request the page does not advance and the error is returned. 10507func (page *LoadBalancerListResultPage) Next() error { 10508 next, err := page.fn(page.lblr) 10509 if err != nil { 10510 return err 10511 } 10512 page.lblr = next 10513 return nil 10514} 10515 10516// NotDone returns true if the page enumeration should be started or is not yet complete. 10517func (page LoadBalancerListResultPage) NotDone() bool { 10518 return !page.lblr.IsEmpty() 10519} 10520 10521// Response returns the raw server response from the last page request. 10522func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { 10523 return page.lblr 10524} 10525 10526// Values returns the slice of values for the current page or nil if there are no values. 10527func (page LoadBalancerListResultPage) Values() []LoadBalancer { 10528 if page.lblr.IsEmpty() { 10529 return nil 10530 } 10531 return *page.lblr.Value 10532} 10533 10534// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. 10535type LoadBalancerLoadBalancingRuleListResult struct { 10536 autorest.Response `json:"-"` 10537 // Value - A list of load balancing rules in a load balancer. 10538 Value *[]LoadBalancingRule `json:"value,omitempty"` 10539 // NextLink - The URL to get the next set of results. 10540 NextLink *string `json:"nextLink,omitempty"` 10541} 10542 10543// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule 10544// values. 10545type LoadBalancerLoadBalancingRuleListResultIterator struct { 10546 i int 10547 page LoadBalancerLoadBalancingRuleListResultPage 10548} 10549 10550// Next advances to the next value. If there was an error making 10551// the request the iterator does not advance and the error is returned. 10552func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { 10553 iter.i++ 10554 if iter.i < len(iter.page.Values()) { 10555 return nil 10556 } 10557 err := iter.page.Next() 10558 if err != nil { 10559 iter.i-- 10560 return err 10561 } 10562 iter.i = 0 10563 return nil 10564} 10565 10566// NotDone returns true if the enumeration should be started or is not yet complete. 10567func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool { 10568 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10569} 10570 10571// Response returns the raw server response from the last page request. 10572func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { 10573 return iter.page.Response() 10574} 10575 10576// Value returns the current value or a zero-initialized value if the 10577// iterator has advanced beyond the end of the collection. 10578func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { 10579 if !iter.page.NotDone() { 10580 return LoadBalancingRule{} 10581 } 10582 return iter.page.Values()[iter.i] 10583} 10584 10585// IsEmpty returns true if the ListResult contains no values. 10586func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { 10587 return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 10588} 10589 10590// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. 10591// It returns nil if no more results exist. 10592func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) { 10593 if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { 10594 return nil, nil 10595 } 10596 return autorest.Prepare(&http.Request{}, 10597 autorest.AsJSON(), 10598 autorest.AsGet(), 10599 autorest.WithBaseURL(to.String(lblbrlr.NextLink))) 10600} 10601 10602// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. 10603type LoadBalancerLoadBalancingRuleListResultPage struct { 10604 fn func(LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) 10605 lblbrlr LoadBalancerLoadBalancingRuleListResult 10606} 10607 10608// Next advances to the next page of values. If there was an error making 10609// the request the page does not advance and the error is returned. 10610func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { 10611 next, err := page.fn(page.lblbrlr) 10612 if err != nil { 10613 return err 10614 } 10615 page.lblbrlr = next 10616 return nil 10617} 10618 10619// NotDone returns true if the page enumeration should be started or is not yet complete. 10620func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { 10621 return !page.lblbrlr.IsEmpty() 10622} 10623 10624// Response returns the raw server response from the last page request. 10625func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { 10626 return page.lblbrlr 10627} 10628 10629// Values returns the slice of values for the current page or nil if there are no values. 10630func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { 10631 if page.lblbrlr.IsEmpty() { 10632 return nil 10633 } 10634 return *page.lblbrlr.Value 10635} 10636 10637// LoadBalancerProbeListResult response for ListProbe API service call. 10638type LoadBalancerProbeListResult struct { 10639 autorest.Response `json:"-"` 10640 // Value - A list of probes in a load balancer. 10641 Value *[]Probe `json:"value,omitempty"` 10642 // NextLink - The URL to get the next set of results. 10643 NextLink *string `json:"nextLink,omitempty"` 10644} 10645 10646// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. 10647type LoadBalancerProbeListResultIterator struct { 10648 i int 10649 page LoadBalancerProbeListResultPage 10650} 10651 10652// Next advances to the next value. If there was an error making 10653// the request the iterator does not advance and the error is returned. 10654func (iter *LoadBalancerProbeListResultIterator) Next() error { 10655 iter.i++ 10656 if iter.i < len(iter.page.Values()) { 10657 return nil 10658 } 10659 err := iter.page.Next() 10660 if err != nil { 10661 iter.i-- 10662 return err 10663 } 10664 iter.i = 0 10665 return nil 10666} 10667 10668// NotDone returns true if the enumeration should be started or is not yet complete. 10669func (iter LoadBalancerProbeListResultIterator) NotDone() bool { 10670 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10671} 10672 10673// Response returns the raw server response from the last page request. 10674func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { 10675 return iter.page.Response() 10676} 10677 10678// Value returns the current value or a zero-initialized value if the 10679// iterator has advanced beyond the end of the collection. 10680func (iter LoadBalancerProbeListResultIterator) Value() Probe { 10681 if !iter.page.NotDone() { 10682 return Probe{} 10683 } 10684 return iter.page.Values()[iter.i] 10685} 10686 10687// IsEmpty returns true if the ListResult contains no values. 10688func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { 10689 return lbplr.Value == nil || len(*lbplr.Value) == 0 10690} 10691 10692// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. 10693// It returns nil if no more results exist. 10694func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (*http.Request, error) { 10695 if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { 10696 return nil, nil 10697 } 10698 return autorest.Prepare(&http.Request{}, 10699 autorest.AsJSON(), 10700 autorest.AsGet(), 10701 autorest.WithBaseURL(to.String(lbplr.NextLink))) 10702} 10703 10704// LoadBalancerProbeListResultPage contains a page of Probe values. 10705type LoadBalancerProbeListResultPage struct { 10706 fn func(LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) 10707 lbplr LoadBalancerProbeListResult 10708} 10709 10710// Next advances to the next page of values. If there was an error making 10711// the request the page does not advance and the error is returned. 10712func (page *LoadBalancerProbeListResultPage) Next() error { 10713 next, err := page.fn(page.lbplr) 10714 if err != nil { 10715 return err 10716 } 10717 page.lbplr = next 10718 return nil 10719} 10720 10721// NotDone returns true if the page enumeration should be started or is not yet complete. 10722func (page LoadBalancerProbeListResultPage) NotDone() bool { 10723 return !page.lbplr.IsEmpty() 10724} 10725 10726// Response returns the raw server response from the last page request. 10727func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { 10728 return page.lbplr 10729} 10730 10731// Values returns the slice of values for the current page or nil if there are no values. 10732func (page LoadBalancerProbeListResultPage) Values() []Probe { 10733 if page.lbplr.IsEmpty() { 10734 return nil 10735 } 10736 return *page.lbplr.Value 10737} 10738 10739// LoadBalancerPropertiesFormat properties of the load balancer. 10740type LoadBalancerPropertiesFormat struct { 10741 // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer 10742 FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` 10743 // BackendAddressPools - Collection of backend address pools used by a load balancer 10744 BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` 10745 // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning 10746 LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` 10747 // Probes - Collection of probe objects used in the load balancer 10748 Probes *[]Probe `json:"probes,omitempty"` 10749 // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. 10750 InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` 10751 // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. 10752 InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` 10753 // OutboundNatRules - The outbound NAT rules. 10754 OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"` 10755 // ResourceGUID - The resource GUID property of the load balancer resource. 10756 ResourceGUID *string `json:"resourceGuid,omitempty"` 10757 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 10758 ProvisioningState *string `json:"provisioningState,omitempty"` 10759} 10760 10761// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 10762// operation. 10763type LoadBalancersCreateOrUpdateFuture struct { 10764 azure.Future 10765 req *http.Request 10766} 10767 10768// Result returns the result of the asynchronous operation. 10769// If the operation has not completed it will return an error. 10770func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { 10771 var done bool 10772 done, err = future.Done(client) 10773 if err != nil { 10774 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 10775 return 10776 } 10777 if !done { 10778 return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") 10779 } 10780 if future.PollingMethod() == azure.PollingLocation { 10781 lb, err = client.CreateOrUpdateResponder(future.Response()) 10782 if err != nil { 10783 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 10784 } 10785 return 10786 } 10787 var req *http.Request 10788 var resp *http.Response 10789 if future.PollingURL() != "" { 10790 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 10791 if err != nil { 10792 return 10793 } 10794 } else { 10795 req = autorest.ChangeToGet(future.req) 10796 } 10797 resp, err = autorest.SendWithSender(client, req, 10798 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10799 if err != nil { 10800 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request") 10801 return 10802 } 10803 lb, err = client.CreateOrUpdateResponder(resp) 10804 if err != nil { 10805 err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 10806 } 10807 return 10808} 10809 10810// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 10811type LoadBalancersDeleteFuture struct { 10812 azure.Future 10813 req *http.Request 10814} 10815 10816// Result returns the result of the asynchronous operation. 10817// If the operation has not completed it will return an error. 10818func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { 10819 var done bool 10820 done, err = future.Done(client) 10821 if err != nil { 10822 err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") 10823 return 10824 } 10825 if !done { 10826 return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") 10827 } 10828 if future.PollingMethod() == azure.PollingLocation { 10829 ar, err = client.DeleteResponder(future.Response()) 10830 if err != nil { 10831 err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request") 10832 } 10833 return 10834 } 10835 var req *http.Request 10836 var resp *http.Response 10837 if future.PollingURL() != "" { 10838 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 10839 if err != nil { 10840 return 10841 } 10842 } else { 10843 req = autorest.ChangeToGet(future.req) 10844 } 10845 resp, err = autorest.SendWithSender(client, req, 10846 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10847 if err != nil { 10848 err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request") 10849 return 10850 } 10851 ar, err = client.DeleteResponder(resp) 10852 if err != nil { 10853 err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request") 10854 } 10855 return 10856} 10857 10858// LoadBalancerSku SKU of a load balancer 10859type LoadBalancerSku struct { 10860 // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' 10861 Name LoadBalancerSkuName `json:"name,omitempty"` 10862} 10863 10864// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 10865// operation. 10866type LoadBalancersUpdateTagsFuture struct { 10867 azure.Future 10868 req *http.Request 10869} 10870 10871// Result returns the result of the asynchronous operation. 10872// If the operation has not completed it will return an error. 10873func (future LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { 10874 var done bool 10875 done, err = future.Done(client) 10876 if err != nil { 10877 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") 10878 return 10879 } 10880 if !done { 10881 return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") 10882 } 10883 if future.PollingMethod() == azure.PollingLocation { 10884 lb, err = client.UpdateTagsResponder(future.Response()) 10885 if err != nil { 10886 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 10887 } 10888 return 10889 } 10890 var req *http.Request 10891 var resp *http.Response 10892 if future.PollingURL() != "" { 10893 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 10894 if err != nil { 10895 return 10896 } 10897 } else { 10898 req = autorest.ChangeToGet(future.req) 10899 } 10900 resp, err = autorest.SendWithSender(client, req, 10901 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10902 if err != nil { 10903 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure sending request") 10904 return 10905 } 10906 lb, err = client.UpdateTagsResponder(resp) 10907 if err != nil { 10908 err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", resp, "Failure responding to request") 10909 } 10910 return 10911} 10912 10913// LoadBalancingRule a load balancing rule for a load balancer. 10914type LoadBalancingRule struct { 10915 autorest.Response `json:"-"` 10916 // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. 10917 *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` 10918 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 10919 Name *string `json:"name,omitempty"` 10920 // Etag - A unique read-only string that changes whenever the resource is updated. 10921 Etag *string `json:"etag,omitempty"` 10922 // ID - Resource ID. 10923 ID *string `json:"id,omitempty"` 10924} 10925 10926// MarshalJSON is the custom marshaler for LoadBalancingRule. 10927func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { 10928 objectMap := make(map[string]interface{}) 10929 if lbr.LoadBalancingRulePropertiesFormat != nil { 10930 objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat 10931 } 10932 if lbr.Name != nil { 10933 objectMap["name"] = lbr.Name 10934 } 10935 if lbr.Etag != nil { 10936 objectMap["etag"] = lbr.Etag 10937 } 10938 if lbr.ID != nil { 10939 objectMap["id"] = lbr.ID 10940 } 10941 return json.Marshal(objectMap) 10942} 10943 10944// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. 10945func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { 10946 var m map[string]*json.RawMessage 10947 err := json.Unmarshal(body, &m) 10948 if err != nil { 10949 return err 10950 } 10951 for k, v := range m { 10952 switch k { 10953 case "properties": 10954 if v != nil { 10955 var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat 10956 err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) 10957 if err != nil { 10958 return err 10959 } 10960 lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat 10961 } 10962 case "name": 10963 if v != nil { 10964 var name string 10965 err = json.Unmarshal(*v, &name) 10966 if err != nil { 10967 return err 10968 } 10969 lbr.Name = &name 10970 } 10971 case "etag": 10972 if v != nil { 10973 var etag string 10974 err = json.Unmarshal(*v, &etag) 10975 if err != nil { 10976 return err 10977 } 10978 lbr.Etag = &etag 10979 } 10980 case "id": 10981 if v != nil { 10982 var ID string 10983 err = json.Unmarshal(*v, &ID) 10984 if err != nil { 10985 return err 10986 } 10987 lbr.ID = &ID 10988 } 10989 } 10990 } 10991 10992 return nil 10993} 10994 10995// LoadBalancingRulePropertiesFormat properties of the load balancer. 10996type LoadBalancingRulePropertiesFormat struct { 10997 // FrontendIPConfiguration - A reference to frontend IP addresses. 10998 FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` 10999 // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. 11000 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 11001 // Probe - The reference of the load balancer probe used by the load balancing rule. 11002 Probe *SubResource `json:"probe,omitempty"` 11003 // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' 11004 Protocol TransportProtocol `json:"protocol,omitempty"` 11005 // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' 11006 LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` 11007 // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port" 11008 FrontendPort *int32 `json:"frontendPort,omitempty"` 11009 // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port" 11010 BackendPort *int32 `json:"backendPort,omitempty"` 11011 // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. 11012 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 11013 // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. 11014 EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` 11015 // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. 11016 DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` 11017 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 11018 ProvisioningState *string `json:"provisioningState,omitempty"` 11019} 11020 11021// LocalNetworkGateway a common class for general resource information 11022type LocalNetworkGateway struct { 11023 autorest.Response `json:"-"` 11024 // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. 11025 *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 11026 // Etag - A unique read-only string that changes whenever the resource is updated. 11027 Etag *string `json:"etag,omitempty"` 11028 // ID - Resource ID. 11029 ID *string `json:"id,omitempty"` 11030 // Name - Resource name. 11031 Name *string `json:"name,omitempty"` 11032 // Type - Resource type. 11033 Type *string `json:"type,omitempty"` 11034 // Location - Resource location. 11035 Location *string `json:"location,omitempty"` 11036 // Tags - Resource tags. 11037 Tags map[string]*string `json:"tags"` 11038} 11039 11040// MarshalJSON is the custom marshaler for LocalNetworkGateway. 11041func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { 11042 objectMap := make(map[string]interface{}) 11043 if lng.LocalNetworkGatewayPropertiesFormat != nil { 11044 objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat 11045 } 11046 if lng.Etag != nil { 11047 objectMap["etag"] = lng.Etag 11048 } 11049 if lng.ID != nil { 11050 objectMap["id"] = lng.ID 11051 } 11052 if lng.Name != nil { 11053 objectMap["name"] = lng.Name 11054 } 11055 if lng.Type != nil { 11056 objectMap["type"] = lng.Type 11057 } 11058 if lng.Location != nil { 11059 objectMap["location"] = lng.Location 11060 } 11061 if lng.Tags != nil { 11062 objectMap["tags"] = lng.Tags 11063 } 11064 return json.Marshal(objectMap) 11065} 11066 11067// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. 11068func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { 11069 var m map[string]*json.RawMessage 11070 err := json.Unmarshal(body, &m) 11071 if err != nil { 11072 return err 11073 } 11074 for k, v := range m { 11075 switch k { 11076 case "properties": 11077 if v != nil { 11078 var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat 11079 err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) 11080 if err != nil { 11081 return err 11082 } 11083 lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat 11084 } 11085 case "etag": 11086 if v != nil { 11087 var etag string 11088 err = json.Unmarshal(*v, &etag) 11089 if err != nil { 11090 return err 11091 } 11092 lng.Etag = &etag 11093 } 11094 case "id": 11095 if v != nil { 11096 var ID string 11097 err = json.Unmarshal(*v, &ID) 11098 if err != nil { 11099 return err 11100 } 11101 lng.ID = &ID 11102 } 11103 case "name": 11104 if v != nil { 11105 var name string 11106 err = json.Unmarshal(*v, &name) 11107 if err != nil { 11108 return err 11109 } 11110 lng.Name = &name 11111 } 11112 case "type": 11113 if v != nil { 11114 var typeVar string 11115 err = json.Unmarshal(*v, &typeVar) 11116 if err != nil { 11117 return err 11118 } 11119 lng.Type = &typeVar 11120 } 11121 case "location": 11122 if v != nil { 11123 var location string 11124 err = json.Unmarshal(*v, &location) 11125 if err != nil { 11126 return err 11127 } 11128 lng.Location = &location 11129 } 11130 case "tags": 11131 if v != nil { 11132 var tags map[string]*string 11133 err = json.Unmarshal(*v, &tags) 11134 if err != nil { 11135 return err 11136 } 11137 lng.Tags = tags 11138 } 11139 } 11140 } 11141 11142 return nil 11143} 11144 11145// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. 11146type LocalNetworkGatewayListResult struct { 11147 autorest.Response `json:"-"` 11148 // Value - A list of local network gateways that exists in a resource group. 11149 Value *[]LocalNetworkGateway `json:"value,omitempty"` 11150 // NextLink - The URL to get the next set of results. 11151 NextLink *string `json:"nextLink,omitempty"` 11152} 11153 11154// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values. 11155type LocalNetworkGatewayListResultIterator struct { 11156 i int 11157 page LocalNetworkGatewayListResultPage 11158} 11159 11160// Next advances to the next value. If there was an error making 11161// the request the iterator does not advance and the error is returned. 11162func (iter *LocalNetworkGatewayListResultIterator) Next() error { 11163 iter.i++ 11164 if iter.i < len(iter.page.Values()) { 11165 return nil 11166 } 11167 err := iter.page.Next() 11168 if err != nil { 11169 iter.i-- 11170 return err 11171 } 11172 iter.i = 0 11173 return nil 11174} 11175 11176// NotDone returns true if the enumeration should be started or is not yet complete. 11177func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { 11178 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11179} 11180 11181// Response returns the raw server response from the last page request. 11182func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { 11183 return iter.page.Response() 11184} 11185 11186// Value returns the current value or a zero-initialized value if the 11187// iterator has advanced beyond the end of the collection. 11188func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { 11189 if !iter.page.NotDone() { 11190 return LocalNetworkGateway{} 11191 } 11192 return iter.page.Values()[iter.i] 11193} 11194 11195// IsEmpty returns true if the ListResult contains no values. 11196func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { 11197 return lnglr.Value == nil || len(*lnglr.Value) == 0 11198} 11199 11200// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 11201// It returns nil if no more results exist. 11202func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) { 11203 if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { 11204 return nil, nil 11205 } 11206 return autorest.Prepare(&http.Request{}, 11207 autorest.AsJSON(), 11208 autorest.AsGet(), 11209 autorest.WithBaseURL(to.String(lnglr.NextLink))) 11210} 11211 11212// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. 11213type LocalNetworkGatewayListResultPage struct { 11214 fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) 11215 lnglr LocalNetworkGatewayListResult 11216} 11217 11218// Next advances to the next page of values. If there was an error making 11219// the request the page does not advance and the error is returned. 11220func (page *LocalNetworkGatewayListResultPage) Next() error { 11221 next, err := page.fn(page.lnglr) 11222 if err != nil { 11223 return err 11224 } 11225 page.lnglr = next 11226 return nil 11227} 11228 11229// NotDone returns true if the page enumeration should be started or is not yet complete. 11230func (page LocalNetworkGatewayListResultPage) NotDone() bool { 11231 return !page.lnglr.IsEmpty() 11232} 11233 11234// Response returns the raw server response from the last page request. 11235func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { 11236 return page.lnglr 11237} 11238 11239// Values returns the slice of values for the current page or nil if there are no values. 11240func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { 11241 if page.lnglr.IsEmpty() { 11242 return nil 11243 } 11244 return *page.lnglr.Value 11245} 11246 11247// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties 11248type LocalNetworkGatewayPropertiesFormat struct { 11249 // LocalNetworkAddressSpace - Local network site address space. 11250 LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` 11251 // GatewayIPAddress - IP address of local network gateway. 11252 GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` 11253 // BgpSettings - Local network gateway's BGP speaker settings. 11254 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 11255 // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. 11256 ResourceGUID *string `json:"resourceGuid,omitempty"` 11257 // ProvisioningState - The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 11258 ProvisioningState *string `json:"provisioningState,omitempty"` 11259} 11260 11261// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 11262// long-running operation. 11263type LocalNetworkGatewaysCreateOrUpdateFuture struct { 11264 azure.Future 11265 req *http.Request 11266} 11267 11268// Result returns the result of the asynchronous operation. 11269// If the operation has not completed it will return an error. 11270func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { 11271 var done bool 11272 done, err = future.Done(client) 11273 if err != nil { 11274 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 11275 return 11276 } 11277 if !done { 11278 return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") 11279 } 11280 if future.PollingMethod() == azure.PollingLocation { 11281 lng, err = client.CreateOrUpdateResponder(future.Response()) 11282 if err != nil { 11283 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 11284 } 11285 return 11286 } 11287 var req *http.Request 11288 var resp *http.Response 11289 if future.PollingURL() != "" { 11290 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 11291 if err != nil { 11292 return 11293 } 11294 } else { 11295 req = autorest.ChangeToGet(future.req) 11296 } 11297 resp, err = autorest.SendWithSender(client, req, 11298 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11299 if err != nil { 11300 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") 11301 return 11302 } 11303 lng, err = client.CreateOrUpdateResponder(resp) 11304 if err != nil { 11305 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 11306 } 11307 return 11308} 11309 11310// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 11311// operation. 11312type LocalNetworkGatewaysDeleteFuture struct { 11313 azure.Future 11314 req *http.Request 11315} 11316 11317// Result returns the result of the asynchronous operation. 11318// If the operation has not completed it will return an error. 11319func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { 11320 var done bool 11321 done, err = future.Done(client) 11322 if err != nil { 11323 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 11324 return 11325 } 11326 if !done { 11327 return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") 11328 } 11329 if future.PollingMethod() == azure.PollingLocation { 11330 ar, err = client.DeleteResponder(future.Response()) 11331 if err != nil { 11332 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") 11333 } 11334 return 11335 } 11336 var req *http.Request 11337 var resp *http.Response 11338 if future.PollingURL() != "" { 11339 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 11340 if err != nil { 11341 return 11342 } 11343 } else { 11344 req = autorest.ChangeToGet(future.req) 11345 } 11346 resp, err = autorest.SendWithSender(client, req, 11347 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11348 if err != nil { 11349 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request") 11350 return 11351 } 11352 ar, err = client.DeleteResponder(resp) 11353 if err != nil { 11354 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request") 11355 } 11356 return 11357} 11358 11359// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 11360// operation. 11361type LocalNetworkGatewaysUpdateTagsFuture struct { 11362 azure.Future 11363 req *http.Request 11364} 11365 11366// Result returns the result of the asynchronous operation. 11367// If the operation has not completed it will return an error. 11368func (future LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { 11369 var done bool 11370 done, err = future.Done(client) 11371 if err != nil { 11372 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 11373 return 11374 } 11375 if !done { 11376 return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") 11377 } 11378 if future.PollingMethod() == azure.PollingLocation { 11379 lng, err = client.UpdateTagsResponder(future.Response()) 11380 if err != nil { 11381 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 11382 } 11383 return 11384 } 11385 var req *http.Request 11386 var resp *http.Response 11387 if future.PollingURL() != "" { 11388 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 11389 if err != nil { 11390 return 11391 } 11392 } else { 11393 req = autorest.ChangeToGet(future.req) 11394 } 11395 resp, err = autorest.SendWithSender(client, req, 11396 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11397 if err != nil { 11398 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request") 11399 return 11400 } 11401 lng, err = client.UpdateTagsResponder(resp) 11402 if err != nil { 11403 err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request") 11404 } 11405 return 11406} 11407 11408// LogSpecification description of logging specification. 11409type LogSpecification struct { 11410 // Name - The name of the specification. 11411 Name *string `json:"name,omitempty"` 11412 // DisplayName - The display name of the specification. 11413 DisplayName *string `json:"displayName,omitempty"` 11414 // BlobDuration - Duration of the blob. 11415 BlobDuration *string `json:"blobDuration,omitempty"` 11416} 11417 11418// MetricSpecification description of metrics specification. 11419type MetricSpecification struct { 11420 // Name - The name of the metric. 11421 Name *string `json:"name,omitempty"` 11422 // DisplayName - The display name of the metric. 11423 DisplayName *string `json:"displayName,omitempty"` 11424 // DisplayDescription - The description of the metric. 11425 DisplayDescription *string `json:"displayDescription,omitempty"` 11426 // Unit - Units the metric to be displayed in. 11427 Unit *string `json:"unit,omitempty"` 11428 // AggregationType - The aggregation type. 11429 AggregationType *string `json:"aggregationType,omitempty"` 11430 // Availabilities - List of availability. 11431 Availabilities *[]Availability `json:"availabilities,omitempty"` 11432 // EnableRegionalMdmAccount - Whether regional MDM account enabled. 11433 EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` 11434 // FillGapWithZero - Whether gaps would be filled with zeros. 11435 FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` 11436 // MetricFilterPattern - Pattern for the filter of the metric. 11437 MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` 11438 // Dimensions - List of dimensions. 11439 Dimensions *[]Dimension `json:"dimensions,omitempty"` 11440 // IsInternal - Whether the metric is internal. 11441 IsInternal *bool `json:"isInternal,omitempty"` 11442 // SourceMdmAccount - The source MDM account. 11443 SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` 11444 // SourceMdmNamespace - The source MDM namespace. 11445 SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` 11446 // ResourceIDDimensionNameOverride - The resource Id dimension name override. 11447 ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` 11448} 11449 11450// NextHopParameters parameters that define the source and destination endpoint. 11451type NextHopParameters struct { 11452 // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. 11453 TargetResourceID *string `json:"targetResourceId,omitempty"` 11454 // SourceIPAddress - The source IP address. 11455 SourceIPAddress *string `json:"sourceIPAddress,omitempty"` 11456 // DestinationIPAddress - The destination IP address. 11457 DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` 11458 // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). 11459 TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` 11460} 11461 11462// NextHopResult the information about next hop from the specified VM. 11463type NextHopResult struct { 11464 autorest.Response `json:"-"` 11465 // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' 11466 NextHopType NextHopType `json:"nextHopType,omitempty"` 11467 // NextHopIPAddress - Next hop IP Address 11468 NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` 11469 // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. 11470 RouteTableID *string `json:"routeTableId,omitempty"` 11471} 11472 11473// Operation network REST API operation definition. 11474type Operation struct { 11475 // Name - Operation name: {provider}/{resource}/{operation} 11476 Name *string `json:"name,omitempty"` 11477 // Display - Display metadata associated with the operation. 11478 Display *OperationDisplay `json:"display,omitempty"` 11479 // Origin - Origin of the operation. 11480 Origin *string `json:"origin,omitempty"` 11481 // OperationPropertiesFormat - Operation properties format. 11482 *OperationPropertiesFormat `json:"properties,omitempty"` 11483} 11484 11485// MarshalJSON is the custom marshaler for Operation. 11486func (o Operation) MarshalJSON() ([]byte, error) { 11487 objectMap := make(map[string]interface{}) 11488 if o.Name != nil { 11489 objectMap["name"] = o.Name 11490 } 11491 if o.Display != nil { 11492 objectMap["display"] = o.Display 11493 } 11494 if o.Origin != nil { 11495 objectMap["origin"] = o.Origin 11496 } 11497 if o.OperationPropertiesFormat != nil { 11498 objectMap["properties"] = o.OperationPropertiesFormat 11499 } 11500 return json.Marshal(objectMap) 11501} 11502 11503// UnmarshalJSON is the custom unmarshaler for Operation struct. 11504func (o *Operation) UnmarshalJSON(body []byte) error { 11505 var m map[string]*json.RawMessage 11506 err := json.Unmarshal(body, &m) 11507 if err != nil { 11508 return err 11509 } 11510 for k, v := range m { 11511 switch k { 11512 case "name": 11513 if v != nil { 11514 var name string 11515 err = json.Unmarshal(*v, &name) 11516 if err != nil { 11517 return err 11518 } 11519 o.Name = &name 11520 } 11521 case "display": 11522 if v != nil { 11523 var display OperationDisplay 11524 err = json.Unmarshal(*v, &display) 11525 if err != nil { 11526 return err 11527 } 11528 o.Display = &display 11529 } 11530 case "origin": 11531 if v != nil { 11532 var origin string 11533 err = json.Unmarshal(*v, &origin) 11534 if err != nil { 11535 return err 11536 } 11537 o.Origin = &origin 11538 } 11539 case "properties": 11540 if v != nil { 11541 var operationPropertiesFormat OperationPropertiesFormat 11542 err = json.Unmarshal(*v, &operationPropertiesFormat) 11543 if err != nil { 11544 return err 11545 } 11546 o.OperationPropertiesFormat = &operationPropertiesFormat 11547 } 11548 } 11549 } 11550 11551 return nil 11552} 11553 11554// OperationDisplay display metadata associated with the operation. 11555type OperationDisplay struct { 11556 // Provider - Service provider: Microsoft Network. 11557 Provider *string `json:"provider,omitempty"` 11558 // Resource - Resource on which the operation is performed. 11559 Resource *string `json:"resource,omitempty"` 11560 // Operation - Type of the operation: get, read, delete, etc. 11561 Operation *string `json:"operation,omitempty"` 11562 // Description - Description of the operation. 11563 Description *string `json:"description,omitempty"` 11564} 11565 11566// OperationListResult result of the request to list Network operations. It contains a list of operations and a URL 11567// link to get the next set of results. 11568type OperationListResult struct { 11569 autorest.Response `json:"-"` 11570 // Value - List of Network operations supported by the Network resource provider. 11571 Value *[]Operation `json:"value,omitempty"` 11572 // NextLink - URL to get the next set of operation list results if there are any. 11573 NextLink *string `json:"nextLink,omitempty"` 11574} 11575 11576// OperationListResultIterator provides access to a complete listing of Operation values. 11577type OperationListResultIterator struct { 11578 i int 11579 page OperationListResultPage 11580} 11581 11582// Next advances to the next value. If there was an error making 11583// the request the iterator does not advance and the error is returned. 11584func (iter *OperationListResultIterator) Next() error { 11585 iter.i++ 11586 if iter.i < len(iter.page.Values()) { 11587 return nil 11588 } 11589 err := iter.page.Next() 11590 if err != nil { 11591 iter.i-- 11592 return err 11593 } 11594 iter.i = 0 11595 return nil 11596} 11597 11598// NotDone returns true if the enumeration should be started or is not yet complete. 11599func (iter OperationListResultIterator) NotDone() bool { 11600 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11601} 11602 11603// Response returns the raw server response from the last page request. 11604func (iter OperationListResultIterator) Response() OperationListResult { 11605 return iter.page.Response() 11606} 11607 11608// Value returns the current value or a zero-initialized value if the 11609// iterator has advanced beyond the end of the collection. 11610func (iter OperationListResultIterator) Value() Operation { 11611 if !iter.page.NotDone() { 11612 return Operation{} 11613 } 11614 return iter.page.Values()[iter.i] 11615} 11616 11617// IsEmpty returns true if the ListResult contains no values. 11618func (olr OperationListResult) IsEmpty() bool { 11619 return olr.Value == nil || len(*olr.Value) == 0 11620} 11621 11622// operationListResultPreparer prepares a request to retrieve the next set of results. 11623// It returns nil if no more results exist. 11624func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) { 11625 if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { 11626 return nil, nil 11627 } 11628 return autorest.Prepare(&http.Request{}, 11629 autorest.AsJSON(), 11630 autorest.AsGet(), 11631 autorest.WithBaseURL(to.String(olr.NextLink))) 11632} 11633 11634// OperationListResultPage contains a page of Operation values. 11635type OperationListResultPage struct { 11636 fn func(OperationListResult) (OperationListResult, error) 11637 olr OperationListResult 11638} 11639 11640// Next advances to the next page of values. If there was an error making 11641// the request the page does not advance and the error is returned. 11642func (page *OperationListResultPage) Next() error { 11643 next, err := page.fn(page.olr) 11644 if err != nil { 11645 return err 11646 } 11647 page.olr = next 11648 return nil 11649} 11650 11651// NotDone returns true if the page enumeration should be started or is not yet complete. 11652func (page OperationListResultPage) NotDone() bool { 11653 return !page.olr.IsEmpty() 11654} 11655 11656// Response returns the raw server response from the last page request. 11657func (page OperationListResultPage) Response() OperationListResult { 11658 return page.olr 11659} 11660 11661// Values returns the slice of values for the current page or nil if there are no values. 11662func (page OperationListResultPage) Values() []Operation { 11663 if page.olr.IsEmpty() { 11664 return nil 11665 } 11666 return *page.olr.Value 11667} 11668 11669// OperationPropertiesFormat description of operation properties format. 11670type OperationPropertiesFormat struct { 11671 // ServiceSpecification - Specification of the service. 11672 ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` 11673} 11674 11675// OperationPropertiesFormatServiceSpecification specification of the service. 11676type OperationPropertiesFormatServiceSpecification struct { 11677 // MetricSpecifications - Operation service specification. 11678 MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` 11679 // LogSpecifications - Operation log specification. 11680 LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` 11681} 11682 11683// OutboundNatRule outbound NAT pool of the load balancer. 11684type OutboundNatRule struct { 11685 // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule. 11686 *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` 11687 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 11688 Name *string `json:"name,omitempty"` 11689 // Etag - A unique read-only string that changes whenever the resource is updated. 11690 Etag *string `json:"etag,omitempty"` 11691 // ID - Resource ID. 11692 ID *string `json:"id,omitempty"` 11693} 11694 11695// MarshalJSON is the custom marshaler for OutboundNatRule. 11696func (onr OutboundNatRule) MarshalJSON() ([]byte, error) { 11697 objectMap := make(map[string]interface{}) 11698 if onr.OutboundNatRulePropertiesFormat != nil { 11699 objectMap["properties"] = onr.OutboundNatRulePropertiesFormat 11700 } 11701 if onr.Name != nil { 11702 objectMap["name"] = onr.Name 11703 } 11704 if onr.Etag != nil { 11705 objectMap["etag"] = onr.Etag 11706 } 11707 if onr.ID != nil { 11708 objectMap["id"] = onr.ID 11709 } 11710 return json.Marshal(objectMap) 11711} 11712 11713// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct. 11714func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error { 11715 var m map[string]*json.RawMessage 11716 err := json.Unmarshal(body, &m) 11717 if err != nil { 11718 return err 11719 } 11720 for k, v := range m { 11721 switch k { 11722 case "properties": 11723 if v != nil { 11724 var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat 11725 err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat) 11726 if err != nil { 11727 return err 11728 } 11729 onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat 11730 } 11731 case "name": 11732 if v != nil { 11733 var name string 11734 err = json.Unmarshal(*v, &name) 11735 if err != nil { 11736 return err 11737 } 11738 onr.Name = &name 11739 } 11740 case "etag": 11741 if v != nil { 11742 var etag string 11743 err = json.Unmarshal(*v, &etag) 11744 if err != nil { 11745 return err 11746 } 11747 onr.Etag = &etag 11748 } 11749 case "id": 11750 if v != nil { 11751 var ID string 11752 err = json.Unmarshal(*v, &ID) 11753 if err != nil { 11754 return err 11755 } 11756 onr.ID = &ID 11757 } 11758 } 11759 } 11760 11761 return nil 11762} 11763 11764// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer. 11765type OutboundNatRulePropertiesFormat struct { 11766 // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. 11767 AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` 11768 // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. 11769 FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` 11770 // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. 11771 BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` 11772 // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 11773 ProvisioningState *string `json:"provisioningState,omitempty"` 11774} 11775 11776// PacketCapture parameters that define the create packet capture operation. 11777type PacketCapture struct { 11778 *PacketCaptureParameters `json:"properties,omitempty"` 11779} 11780 11781// MarshalJSON is the custom marshaler for PacketCapture. 11782func (pc PacketCapture) MarshalJSON() ([]byte, error) { 11783 objectMap := make(map[string]interface{}) 11784 if pc.PacketCaptureParameters != nil { 11785 objectMap["properties"] = pc.PacketCaptureParameters 11786 } 11787 return json.Marshal(objectMap) 11788} 11789 11790// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. 11791func (pc *PacketCapture) UnmarshalJSON(body []byte) error { 11792 var m map[string]*json.RawMessage 11793 err := json.Unmarshal(body, &m) 11794 if err != nil { 11795 return err 11796 } 11797 for k, v := range m { 11798 switch k { 11799 case "properties": 11800 if v != nil { 11801 var packetCaptureParameters PacketCaptureParameters 11802 err = json.Unmarshal(*v, &packetCaptureParameters) 11803 if err != nil { 11804 return err 11805 } 11806 pc.PacketCaptureParameters = &packetCaptureParameters 11807 } 11808 } 11809 } 11810 11811 return nil 11812} 11813 11814// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. 11815type PacketCaptureFilter struct { 11816 // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' 11817 Protocol PcProtocol `json:"protocol,omitempty"` 11818 // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 11819 LocalIPAddress *string `json:"localIPAddress,omitempty"` 11820 // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 11821 RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` 11822 // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 11823 LocalPort *string `json:"localPort,omitempty"` 11824 // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. 11825 RemotePort *string `json:"remotePort,omitempty"` 11826} 11827 11828// PacketCaptureListResult list of packet capture sessions. 11829type PacketCaptureListResult struct { 11830 autorest.Response `json:"-"` 11831 // Value - Information about packet capture sessions. 11832 Value *[]PacketCaptureResult `json:"value,omitempty"` 11833} 11834 11835// PacketCaptureParameters parameters that define the create packet capture operation. 11836type PacketCaptureParameters struct { 11837 // Target - The ID of the targeted resource, only VM is currently supported. 11838 Target *string `json:"target,omitempty"` 11839 // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. 11840 BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` 11841 // TotalBytesPerSession - Maximum size of the capture output. 11842 TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` 11843 // TimeLimitInSeconds - Maximum duration of the capture session in seconds. 11844 TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` 11845 StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` 11846 Filters *[]PacketCaptureFilter `json:"filters,omitempty"` 11847} 11848 11849// PacketCaptureQueryStatusResult status of packet capture session. 11850type PacketCaptureQueryStatusResult struct { 11851 autorest.Response `json:"-"` 11852 // Name - The name of the packet capture resource. 11853 Name *string `json:"name,omitempty"` 11854 // ID - The ID of the packet capture resource. 11855 ID *string `json:"id,omitempty"` 11856 // CaptureStartTime - The start time of the packet capture session. 11857 CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` 11858 // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' 11859 PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` 11860 // StopReason - The reason the current packet capture session was stopped. 11861 StopReason *string `json:"stopReason,omitempty"` 11862 // PacketCaptureError - List of errors of packet capture session. 11863 PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` 11864} 11865 11866// PacketCaptureResult information about packet capture session. 11867type PacketCaptureResult struct { 11868 autorest.Response `json:"-"` 11869 // Name - Name of the packet capture session. 11870 Name *string `json:"name,omitempty"` 11871 // ID - ID of the packet capture operation. 11872 ID *string `json:"id,omitempty"` 11873 Etag *string `json:"etag,omitempty"` 11874 *PacketCaptureResultProperties `json:"properties,omitempty"` 11875} 11876 11877// MarshalJSON is the custom marshaler for PacketCaptureResult. 11878func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { 11879 objectMap := make(map[string]interface{}) 11880 if pcr.Name != nil { 11881 objectMap["name"] = pcr.Name 11882 } 11883 if pcr.ID != nil { 11884 objectMap["id"] = pcr.ID 11885 } 11886 if pcr.Etag != nil { 11887 objectMap["etag"] = pcr.Etag 11888 } 11889 if pcr.PacketCaptureResultProperties != nil { 11890 objectMap["properties"] = pcr.PacketCaptureResultProperties 11891 } 11892 return json.Marshal(objectMap) 11893} 11894 11895// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. 11896func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { 11897 var m map[string]*json.RawMessage 11898 err := json.Unmarshal(body, &m) 11899 if err != nil { 11900 return err 11901 } 11902 for k, v := range m { 11903 switch k { 11904 case "name": 11905 if v != nil { 11906 var name string 11907 err = json.Unmarshal(*v, &name) 11908 if err != nil { 11909 return err 11910 } 11911 pcr.Name = &name 11912 } 11913 case "id": 11914 if v != nil { 11915 var ID string 11916 err = json.Unmarshal(*v, &ID) 11917 if err != nil { 11918 return err 11919 } 11920 pcr.ID = &ID 11921 } 11922 case "etag": 11923 if v != nil { 11924 var etag string 11925 err = json.Unmarshal(*v, &etag) 11926 if err != nil { 11927 return err 11928 } 11929 pcr.Etag = &etag 11930 } 11931 case "properties": 11932 if v != nil { 11933 var packetCaptureResultProperties PacketCaptureResultProperties 11934 err = json.Unmarshal(*v, &packetCaptureResultProperties) 11935 if err != nil { 11936 return err 11937 } 11938 pcr.PacketCaptureResultProperties = &packetCaptureResultProperties 11939 } 11940 } 11941 } 11942 11943 return nil 11944} 11945 11946// PacketCaptureResultProperties describes the properties of a packet capture session. 11947type PacketCaptureResultProperties struct { 11948 // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 11949 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 11950 // Target - The ID of the targeted resource, only VM is currently supported. 11951 Target *string `json:"target,omitempty"` 11952 // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. 11953 BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` 11954 // TotalBytesPerSession - Maximum size of the capture output. 11955 TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` 11956 // TimeLimitInSeconds - Maximum duration of the capture session in seconds. 11957 TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` 11958 StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` 11959 Filters *[]PacketCaptureFilter `json:"filters,omitempty"` 11960} 11961 11962// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 11963type PacketCapturesCreateFuture struct { 11964 azure.Future 11965 req *http.Request 11966} 11967 11968// Result returns the result of the asynchronous operation. 11969// If the operation has not completed it will return an error. 11970func (future PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { 11971 var done bool 11972 done, err = future.Done(client) 11973 if err != nil { 11974 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") 11975 return 11976 } 11977 if !done { 11978 return pcr, azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") 11979 } 11980 if future.PollingMethod() == azure.PollingLocation { 11981 pcr, err = client.CreateResponder(future.Response()) 11982 if err != nil { 11983 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Failure responding to request") 11984 } 11985 return 11986 } 11987 var req *http.Request 11988 var resp *http.Response 11989 if future.PollingURL() != "" { 11990 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 11991 if err != nil { 11992 return 11993 } 11994 } else { 11995 req = autorest.ChangeToGet(future.req) 11996 } 11997 resp, err = autorest.SendWithSender(client, req, 11998 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11999 if err != nil { 12000 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure sending request") 12001 return 12002 } 12003 pcr, err = client.CreateResponder(resp) 12004 if err != nil { 12005 err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", resp, "Failure responding to request") 12006 } 12007 return 12008} 12009 12010// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 12011type PacketCapturesDeleteFuture struct { 12012 azure.Future 12013 req *http.Request 12014} 12015 12016// Result returns the result of the asynchronous operation. 12017// If the operation has not completed it will return an error. 12018func (future PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { 12019 var done bool 12020 done, err = future.Done(client) 12021 if err != nil { 12022 err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") 12023 return 12024 } 12025 if !done { 12026 return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") 12027 } 12028 if future.PollingMethod() == azure.PollingLocation { 12029 ar, err = client.DeleteResponder(future.Response()) 12030 if err != nil { 12031 err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Failure responding to request") 12032 } 12033 return 12034 } 12035 var req *http.Request 12036 var resp *http.Response 12037 if future.PollingURL() != "" { 12038 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12039 if err != nil { 12040 return 12041 } 12042 } else { 12043 req = autorest.ChangeToGet(future.req) 12044 } 12045 resp, err = autorest.SendWithSender(client, req, 12046 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12047 if err != nil { 12048 err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure sending request") 12049 return 12050 } 12051 ar, err = client.DeleteResponder(resp) 12052 if err != nil { 12053 err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", resp, "Failure responding to request") 12054 } 12055 return 12056} 12057 12058// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running 12059// operation. 12060type PacketCapturesGetStatusFuture struct { 12061 azure.Future 12062 req *http.Request 12063} 12064 12065// Result returns the result of the asynchronous operation. 12066// If the operation has not completed it will return an error. 12067func (future PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { 12068 var done bool 12069 done, err = future.Done(client) 12070 if err != nil { 12071 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") 12072 return 12073 } 12074 if !done { 12075 return pcqsr, azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") 12076 } 12077 if future.PollingMethod() == azure.PollingLocation { 12078 pcqsr, err = client.GetStatusResponder(future.Response()) 12079 if err != nil { 12080 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Failure responding to request") 12081 } 12082 return 12083 } 12084 var req *http.Request 12085 var resp *http.Response 12086 if future.PollingURL() != "" { 12087 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12088 if err != nil { 12089 return 12090 } 12091 } else { 12092 req = autorest.ChangeToGet(future.req) 12093 } 12094 resp, err = autorest.SendWithSender(client, req, 12095 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12096 if err != nil { 12097 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure sending request") 12098 return 12099 } 12100 pcqsr, err = client.GetStatusResponder(resp) 12101 if err != nil { 12102 err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", resp, "Failure responding to request") 12103 } 12104 return 12105} 12106 12107// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation. 12108type PacketCapturesStopFuture struct { 12109 azure.Future 12110 req *http.Request 12111} 12112 12113// Result returns the result of the asynchronous operation. 12114// If the operation has not completed it will return an error. 12115func (future PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { 12116 var done bool 12117 done, err = future.Done(client) 12118 if err != nil { 12119 err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") 12120 return 12121 } 12122 if !done { 12123 return ar, azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") 12124 } 12125 if future.PollingMethod() == azure.PollingLocation { 12126 ar, err = client.StopResponder(future.Response()) 12127 if err != nil { 12128 err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Failure responding to request") 12129 } 12130 return 12131 } 12132 var req *http.Request 12133 var resp *http.Response 12134 if future.PollingURL() != "" { 12135 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12136 if err != nil { 12137 return 12138 } 12139 } else { 12140 req = autorest.ChangeToGet(future.req) 12141 } 12142 resp, err = autorest.SendWithSender(client, req, 12143 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12144 if err != nil { 12145 err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure sending request") 12146 return 12147 } 12148 ar, err = client.StopResponder(resp) 12149 if err != nil { 12150 err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", resp, "Failure responding to request") 12151 } 12152 return 12153} 12154 12155// PacketCaptureStorageLocation describes the storage location for a packet capture session. 12156type PacketCaptureStorageLocation struct { 12157 // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. 12158 StorageID *string `json:"storageId,omitempty"` 12159 // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. 12160 StoragePath *string `json:"storagePath,omitempty"` 12161 // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. 12162 FilePath *string `json:"filePath,omitempty"` 12163} 12164 12165// PatchRouteFilter route Filter Resource. 12166type PatchRouteFilter struct { 12167 *RouteFilterPropertiesFormat `json:"properties,omitempty"` 12168 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 12169 Name *string `json:"name,omitempty"` 12170 // Etag - A unique read-only string that changes whenever the resource is updated. 12171 Etag *string `json:"etag,omitempty"` 12172 // Type - Resource type. 12173 Type *string `json:"type,omitempty"` 12174 // Tags - Resource tags. 12175 Tags map[string]*string `json:"tags"` 12176 // ID - Resource ID. 12177 ID *string `json:"id,omitempty"` 12178} 12179 12180// MarshalJSON is the custom marshaler for PatchRouteFilter. 12181func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { 12182 objectMap := make(map[string]interface{}) 12183 if prf.RouteFilterPropertiesFormat != nil { 12184 objectMap["properties"] = prf.RouteFilterPropertiesFormat 12185 } 12186 if prf.Name != nil { 12187 objectMap["name"] = prf.Name 12188 } 12189 if prf.Etag != nil { 12190 objectMap["etag"] = prf.Etag 12191 } 12192 if prf.Type != nil { 12193 objectMap["type"] = prf.Type 12194 } 12195 if prf.Tags != nil { 12196 objectMap["tags"] = prf.Tags 12197 } 12198 if prf.ID != nil { 12199 objectMap["id"] = prf.ID 12200 } 12201 return json.Marshal(objectMap) 12202} 12203 12204// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. 12205func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { 12206 var m map[string]*json.RawMessage 12207 err := json.Unmarshal(body, &m) 12208 if err != nil { 12209 return err 12210 } 12211 for k, v := range m { 12212 switch k { 12213 case "properties": 12214 if v != nil { 12215 var routeFilterPropertiesFormat RouteFilterPropertiesFormat 12216 err = json.Unmarshal(*v, &routeFilterPropertiesFormat) 12217 if err != nil { 12218 return err 12219 } 12220 prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat 12221 } 12222 case "name": 12223 if v != nil { 12224 var name string 12225 err = json.Unmarshal(*v, &name) 12226 if err != nil { 12227 return err 12228 } 12229 prf.Name = &name 12230 } 12231 case "etag": 12232 if v != nil { 12233 var etag string 12234 err = json.Unmarshal(*v, &etag) 12235 if err != nil { 12236 return err 12237 } 12238 prf.Etag = &etag 12239 } 12240 case "type": 12241 if v != nil { 12242 var typeVar string 12243 err = json.Unmarshal(*v, &typeVar) 12244 if err != nil { 12245 return err 12246 } 12247 prf.Type = &typeVar 12248 } 12249 case "tags": 12250 if v != nil { 12251 var tags map[string]*string 12252 err = json.Unmarshal(*v, &tags) 12253 if err != nil { 12254 return err 12255 } 12256 prf.Tags = tags 12257 } 12258 case "id": 12259 if v != nil { 12260 var ID string 12261 err = json.Unmarshal(*v, &ID) 12262 if err != nil { 12263 return err 12264 } 12265 prf.ID = &ID 12266 } 12267 } 12268 } 12269 12270 return nil 12271} 12272 12273// PatchRouteFilterRule route Filter Rule Resource 12274type PatchRouteFilterRule struct { 12275 *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` 12276 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 12277 Name *string `json:"name,omitempty"` 12278 // Etag - A unique read-only string that changes whenever the resource is updated. 12279 Etag *string `json:"etag,omitempty"` 12280 // ID - Resource ID. 12281 ID *string `json:"id,omitempty"` 12282} 12283 12284// MarshalJSON is the custom marshaler for PatchRouteFilterRule. 12285func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { 12286 objectMap := make(map[string]interface{}) 12287 if prfr.RouteFilterRulePropertiesFormat != nil { 12288 objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat 12289 } 12290 if prfr.Name != nil { 12291 objectMap["name"] = prfr.Name 12292 } 12293 if prfr.Etag != nil { 12294 objectMap["etag"] = prfr.Etag 12295 } 12296 if prfr.ID != nil { 12297 objectMap["id"] = prfr.ID 12298 } 12299 return json.Marshal(objectMap) 12300} 12301 12302// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. 12303func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { 12304 var m map[string]*json.RawMessage 12305 err := json.Unmarshal(body, &m) 12306 if err != nil { 12307 return err 12308 } 12309 for k, v := range m { 12310 switch k { 12311 case "properties": 12312 if v != nil { 12313 var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat 12314 err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) 12315 if err != nil { 12316 return err 12317 } 12318 prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat 12319 } 12320 case "name": 12321 if v != nil { 12322 var name string 12323 err = json.Unmarshal(*v, &name) 12324 if err != nil { 12325 return err 12326 } 12327 prfr.Name = &name 12328 } 12329 case "etag": 12330 if v != nil { 12331 var etag string 12332 err = json.Unmarshal(*v, &etag) 12333 if err != nil { 12334 return err 12335 } 12336 prfr.Etag = &etag 12337 } 12338 case "id": 12339 if v != nil { 12340 var ID string 12341 err = json.Unmarshal(*v, &ID) 12342 if err != nil { 12343 return err 12344 } 12345 prfr.ID = &ID 12346 } 12347 } 12348 } 12349 12350 return nil 12351} 12352 12353// Probe a load balancer probe. 12354type Probe struct { 12355 autorest.Response `json:"-"` 12356 // ProbePropertiesFormat - Properties of load balancer probe. 12357 *ProbePropertiesFormat `json:"properties,omitempty"` 12358 // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. 12359 Name *string `json:"name,omitempty"` 12360 // Etag - A unique read-only string that changes whenever the resource is updated. 12361 Etag *string `json:"etag,omitempty"` 12362 // ID - Resource ID. 12363 ID *string `json:"id,omitempty"` 12364} 12365 12366// MarshalJSON is the custom marshaler for Probe. 12367func (p Probe) MarshalJSON() ([]byte, error) { 12368 objectMap := make(map[string]interface{}) 12369 if p.ProbePropertiesFormat != nil { 12370 objectMap["properties"] = p.ProbePropertiesFormat 12371 } 12372 if p.Name != nil { 12373 objectMap["name"] = p.Name 12374 } 12375 if p.Etag != nil { 12376 objectMap["etag"] = p.Etag 12377 } 12378 if p.ID != nil { 12379 objectMap["id"] = p.ID 12380 } 12381 return json.Marshal(objectMap) 12382} 12383 12384// UnmarshalJSON is the custom unmarshaler for Probe struct. 12385func (p *Probe) UnmarshalJSON(body []byte) error { 12386 var m map[string]*json.RawMessage 12387 err := json.Unmarshal(body, &m) 12388 if err != nil { 12389 return err 12390 } 12391 for k, v := range m { 12392 switch k { 12393 case "properties": 12394 if v != nil { 12395 var probePropertiesFormat ProbePropertiesFormat 12396 err = json.Unmarshal(*v, &probePropertiesFormat) 12397 if err != nil { 12398 return err 12399 } 12400 p.ProbePropertiesFormat = &probePropertiesFormat 12401 } 12402 case "name": 12403 if v != nil { 12404 var name string 12405 err = json.Unmarshal(*v, &name) 12406 if err != nil { 12407 return err 12408 } 12409 p.Name = &name 12410 } 12411 case "etag": 12412 if v != nil { 12413 var etag string 12414 err = json.Unmarshal(*v, &etag) 12415 if err != nil { 12416 return err 12417 } 12418 p.Etag = &etag 12419 } 12420 case "id": 12421 if v != nil { 12422 var ID string 12423 err = json.Unmarshal(*v, &ID) 12424 if err != nil { 12425 return err 12426 } 12427 p.ID = &ID 12428 } 12429 } 12430 } 12431 12432 return nil 12433} 12434 12435// ProbePropertiesFormat load balancer probe resource. 12436type ProbePropertiesFormat struct { 12437 // LoadBalancingRules - The load balancer rules that use this probe. 12438 LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` 12439 // Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP' 12440 Protocol ProbeProtocol `json:"protocol,omitempty"` 12441 // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. 12442 Port *int32 `json:"port,omitempty"` 12443 // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. 12444 IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` 12445 // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. 12446 NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` 12447 // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. 12448 RequestPath *string `json:"requestPath,omitempty"` 12449 // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 12450 ProvisioningState *string `json:"provisioningState,omitempty"` 12451} 12452 12453// ProtocolConfiguration configuration of the protocol. 12454type ProtocolConfiguration struct { 12455 HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` 12456} 12457 12458// PublicIPAddress public IP address resource. 12459type PublicIPAddress struct { 12460 autorest.Response `json:"-"` 12461 // Sku - The public IP address SKU. 12462 Sku *PublicIPAddressSku `json:"sku,omitempty"` 12463 // PublicIPAddressPropertiesFormat - Public IP address properties. 12464 *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` 12465 // Etag - A unique read-only string that changes whenever the resource is updated. 12466 Etag *string `json:"etag,omitempty"` 12467 // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. 12468 Zones *[]string `json:"zones,omitempty"` 12469 // ID - Resource ID. 12470 ID *string `json:"id,omitempty"` 12471 // Name - Resource name. 12472 Name *string `json:"name,omitempty"` 12473 // Type - Resource type. 12474 Type *string `json:"type,omitempty"` 12475 // Location - Resource location. 12476 Location *string `json:"location,omitempty"` 12477 // Tags - Resource tags. 12478 Tags map[string]*string `json:"tags"` 12479} 12480 12481// MarshalJSON is the custom marshaler for PublicIPAddress. 12482func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { 12483 objectMap := make(map[string]interface{}) 12484 if pia.Sku != nil { 12485 objectMap["sku"] = pia.Sku 12486 } 12487 if pia.PublicIPAddressPropertiesFormat != nil { 12488 objectMap["properties"] = pia.PublicIPAddressPropertiesFormat 12489 } 12490 if pia.Etag != nil { 12491 objectMap["etag"] = pia.Etag 12492 } 12493 if pia.Zones != nil { 12494 objectMap["zones"] = pia.Zones 12495 } 12496 if pia.ID != nil { 12497 objectMap["id"] = pia.ID 12498 } 12499 if pia.Name != nil { 12500 objectMap["name"] = pia.Name 12501 } 12502 if pia.Type != nil { 12503 objectMap["type"] = pia.Type 12504 } 12505 if pia.Location != nil { 12506 objectMap["location"] = pia.Location 12507 } 12508 if pia.Tags != nil { 12509 objectMap["tags"] = pia.Tags 12510 } 12511 return json.Marshal(objectMap) 12512} 12513 12514// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct. 12515func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error { 12516 var m map[string]*json.RawMessage 12517 err := json.Unmarshal(body, &m) 12518 if err != nil { 12519 return err 12520 } 12521 for k, v := range m { 12522 switch k { 12523 case "sku": 12524 if v != nil { 12525 var sku PublicIPAddressSku 12526 err = json.Unmarshal(*v, &sku) 12527 if err != nil { 12528 return err 12529 } 12530 pia.Sku = &sku 12531 } 12532 case "properties": 12533 if v != nil { 12534 var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat 12535 err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat) 12536 if err != nil { 12537 return err 12538 } 12539 pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat 12540 } 12541 case "etag": 12542 if v != nil { 12543 var etag string 12544 err = json.Unmarshal(*v, &etag) 12545 if err != nil { 12546 return err 12547 } 12548 pia.Etag = &etag 12549 } 12550 case "zones": 12551 if v != nil { 12552 var zones []string 12553 err = json.Unmarshal(*v, &zones) 12554 if err != nil { 12555 return err 12556 } 12557 pia.Zones = &zones 12558 } 12559 case "id": 12560 if v != nil { 12561 var ID string 12562 err = json.Unmarshal(*v, &ID) 12563 if err != nil { 12564 return err 12565 } 12566 pia.ID = &ID 12567 } 12568 case "name": 12569 if v != nil { 12570 var name string 12571 err = json.Unmarshal(*v, &name) 12572 if err != nil { 12573 return err 12574 } 12575 pia.Name = &name 12576 } 12577 case "type": 12578 if v != nil { 12579 var typeVar string 12580 err = json.Unmarshal(*v, &typeVar) 12581 if err != nil { 12582 return err 12583 } 12584 pia.Type = &typeVar 12585 } 12586 case "location": 12587 if v != nil { 12588 var location string 12589 err = json.Unmarshal(*v, &location) 12590 if err != nil { 12591 return err 12592 } 12593 pia.Location = &location 12594 } 12595 case "tags": 12596 if v != nil { 12597 var tags map[string]*string 12598 err = json.Unmarshal(*v, &tags) 12599 if err != nil { 12600 return err 12601 } 12602 pia.Tags = tags 12603 } 12604 } 12605 } 12606 12607 return nil 12608} 12609 12610// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address 12611type PublicIPAddressDNSSettings struct { 12612 // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. 12613 DomainNameLabel *string `json:"domainNameLabel,omitempty"` 12614 // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. 12615 Fqdn *string `json:"fqdn,omitempty"` 12616 // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. 12617 ReverseFqdn *string `json:"reverseFqdn,omitempty"` 12618} 12619 12620// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 12621// operation. 12622type PublicIPAddressesCreateOrUpdateFuture struct { 12623 azure.Future 12624 req *http.Request 12625} 12626 12627// Result returns the result of the asynchronous operation. 12628// If the operation has not completed it will return an error. 12629func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { 12630 var done bool 12631 done, err = future.Done(client) 12632 if err != nil { 12633 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 12634 return 12635 } 12636 if !done { 12637 return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture") 12638 } 12639 if future.PollingMethod() == azure.PollingLocation { 12640 pia, err = client.CreateOrUpdateResponder(future.Response()) 12641 if err != nil { 12642 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 12643 } 12644 return 12645 } 12646 var req *http.Request 12647 var resp *http.Response 12648 if future.PollingURL() != "" { 12649 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12650 if err != nil { 12651 return 12652 } 12653 } else { 12654 req = autorest.ChangeToGet(future.req) 12655 } 12656 resp, err = autorest.SendWithSender(client, req, 12657 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12658 if err != nil { 12659 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 12660 return 12661 } 12662 pia, err = client.CreateOrUpdateResponder(resp) 12663 if err != nil { 12664 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 12665 } 12666 return 12667} 12668 12669// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 12670// operation. 12671type PublicIPAddressesDeleteFuture struct { 12672 azure.Future 12673 req *http.Request 12674} 12675 12676// Result returns the result of the asynchronous operation. 12677// If the operation has not completed it will return an error. 12678func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) { 12679 var done bool 12680 done, err = future.Done(client) 12681 if err != nil { 12682 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure") 12683 return 12684 } 12685 if !done { 12686 return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture") 12687 } 12688 if future.PollingMethod() == azure.PollingLocation { 12689 ar, err = client.DeleteResponder(future.Response()) 12690 if err != nil { 12691 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request") 12692 } 12693 return 12694 } 12695 var req *http.Request 12696 var resp *http.Response 12697 if future.PollingURL() != "" { 12698 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12699 if err != nil { 12700 return 12701 } 12702 } else { 12703 req = autorest.ChangeToGet(future.req) 12704 } 12705 resp, err = autorest.SendWithSender(client, req, 12706 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12707 if err != nil { 12708 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request") 12709 return 12710 } 12711 ar, err = client.DeleteResponder(resp) 12712 if err != nil { 12713 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request") 12714 } 12715 return 12716} 12717 12718// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 12719// operation. 12720type PublicIPAddressesUpdateTagsFuture struct { 12721 azure.Future 12722 req *http.Request 12723} 12724 12725// Result returns the result of the asynchronous operation. 12726// If the operation has not completed it will return an error. 12727func (future PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { 12728 var done bool 12729 done, err = future.Done(client) 12730 if err != nil { 12731 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 12732 return 12733 } 12734 if !done { 12735 return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") 12736 } 12737 if future.PollingMethod() == azure.PollingLocation { 12738 pia, err = client.UpdateTagsResponder(future.Response()) 12739 if err != nil { 12740 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 12741 } 12742 return 12743 } 12744 var req *http.Request 12745 var resp *http.Response 12746 if future.PollingURL() != "" { 12747 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 12748 if err != nil { 12749 return 12750 } 12751 } else { 12752 req = autorest.ChangeToGet(future.req) 12753 } 12754 resp, err = autorest.SendWithSender(client, req, 12755 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12756 if err != nil { 12757 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure sending request") 12758 return 12759 } 12760 pia, err = client.UpdateTagsResponder(resp) 12761 if err != nil { 12762 err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", resp, "Failure responding to request") 12763 } 12764 return 12765} 12766 12767// PublicIPAddressListResult response for ListPublicIpAddresses API service call. 12768type PublicIPAddressListResult struct { 12769 autorest.Response `json:"-"` 12770 // Value - A list of public IP addresses that exists in a resource group. 12771 Value *[]PublicIPAddress `json:"value,omitempty"` 12772 // NextLink - The URL to get the next set of results. 12773 NextLink *string `json:"nextLink,omitempty"` 12774} 12775 12776// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values. 12777type PublicIPAddressListResultIterator struct { 12778 i int 12779 page PublicIPAddressListResultPage 12780} 12781 12782// Next advances to the next value. If there was an error making 12783// the request the iterator does not advance and the error is returned. 12784func (iter *PublicIPAddressListResultIterator) Next() error { 12785 iter.i++ 12786 if iter.i < len(iter.page.Values()) { 12787 return nil 12788 } 12789 err := iter.page.Next() 12790 if err != nil { 12791 iter.i-- 12792 return err 12793 } 12794 iter.i = 0 12795 return nil 12796} 12797 12798// NotDone returns true if the enumeration should be started or is not yet complete. 12799func (iter PublicIPAddressListResultIterator) NotDone() bool { 12800 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12801} 12802 12803// Response returns the raw server response from the last page request. 12804func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult { 12805 return iter.page.Response() 12806} 12807 12808// Value returns the current value or a zero-initialized value if the 12809// iterator has advanced beyond the end of the collection. 12810func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress { 12811 if !iter.page.NotDone() { 12812 return PublicIPAddress{} 12813 } 12814 return iter.page.Values()[iter.i] 12815} 12816 12817// IsEmpty returns true if the ListResult contains no values. 12818func (pialr PublicIPAddressListResult) IsEmpty() bool { 12819 return pialr.Value == nil || len(*pialr.Value) == 0 12820} 12821 12822// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results. 12823// It returns nil if no more results exist. 12824func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) { 12825 if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 { 12826 return nil, nil 12827 } 12828 return autorest.Prepare(&http.Request{}, 12829 autorest.AsJSON(), 12830 autorest.AsGet(), 12831 autorest.WithBaseURL(to.String(pialr.NextLink))) 12832} 12833 12834// PublicIPAddressListResultPage contains a page of PublicIPAddress values. 12835type PublicIPAddressListResultPage struct { 12836 fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error) 12837 pialr PublicIPAddressListResult 12838} 12839 12840// Next advances to the next page of values. If there was an error making 12841// the request the page does not advance and the error is returned. 12842func (page *PublicIPAddressListResultPage) Next() error { 12843 next, err := page.fn(page.pialr) 12844 if err != nil { 12845 return err 12846 } 12847 page.pialr = next 12848 return nil 12849} 12850 12851// NotDone returns true if the page enumeration should be started or is not yet complete. 12852func (page PublicIPAddressListResultPage) NotDone() bool { 12853 return !page.pialr.IsEmpty() 12854} 12855 12856// Response returns the raw server response from the last page request. 12857func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult { 12858 return page.pialr 12859} 12860 12861// Values returns the slice of values for the current page or nil if there are no values. 12862func (page PublicIPAddressListResultPage) Values() []PublicIPAddress { 12863 if page.pialr.IsEmpty() { 12864 return nil 12865 } 12866 return *page.pialr.Value 12867} 12868 12869// PublicIPAddressPropertiesFormat public IP address properties. 12870type PublicIPAddressPropertiesFormat struct { 12871 // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 12872 PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` 12873 // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' 12874 PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` 12875 // IPConfiguration - The IP configuration associated with the public IP address. 12876 IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` 12877 // DNSSettings - The FQDN of the DNS record associated with the public IP address. 12878 DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` 12879 // IPTags - The list of tags associated with the public IP address. 12880 IPTags *[]IPTag `json:"ipTags,omitempty"` 12881 // IPAddress - The IP address associated with the public IP address resource. 12882 IPAddress *string `json:"ipAddress,omitempty"` 12883 // IdleTimeoutInMinutes - The idle timeout of the public IP address. 12884 IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` 12885 // ResourceGUID - The resource GUID property of the public IP resource. 12886 ResourceGUID *string `json:"resourceGuid,omitempty"` 12887 // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 12888 ProvisioningState *string `json:"provisioningState,omitempty"` 12889} 12890 12891// PublicIPAddressSku SKU of a public IP address 12892type PublicIPAddressSku struct { 12893 // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' 12894 Name PublicIPAddressSkuName `json:"name,omitempty"` 12895} 12896 12897// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. 12898type QueryTroubleshootingParameters struct { 12899 // TargetResourceID - The target resource ID to query the troubleshooting result. 12900 TargetResourceID *string `json:"targetResourceId,omitempty"` 12901} 12902 12903// Resource common resource representation. 12904type Resource struct { 12905 // ID - Resource ID. 12906 ID *string `json:"id,omitempty"` 12907 // Name - Resource name. 12908 Name *string `json:"name,omitempty"` 12909 // Type - Resource type. 12910 Type *string `json:"type,omitempty"` 12911 // Location - Resource location. 12912 Location *string `json:"location,omitempty"` 12913 // Tags - Resource tags. 12914 Tags map[string]*string `json:"tags"` 12915} 12916 12917// MarshalJSON is the custom marshaler for Resource. 12918func (r Resource) MarshalJSON() ([]byte, error) { 12919 objectMap := make(map[string]interface{}) 12920 if r.ID != nil { 12921 objectMap["id"] = r.ID 12922 } 12923 if r.Name != nil { 12924 objectMap["name"] = r.Name 12925 } 12926 if r.Type != nil { 12927 objectMap["type"] = r.Type 12928 } 12929 if r.Location != nil { 12930 objectMap["location"] = r.Location 12931 } 12932 if r.Tags != nil { 12933 objectMap["tags"] = r.Tags 12934 } 12935 return json.Marshal(objectMap) 12936} 12937 12938// ResourceNavigationLink resourceNavigationLink resource. 12939type ResourceNavigationLink struct { 12940 // ResourceNavigationLinkFormat - Resource navigation link properties format. 12941 *ResourceNavigationLinkFormat `json:"properties,omitempty"` 12942 // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. 12943 Name *string `json:"name,omitempty"` 12944 // Etag - A unique read-only string that changes whenever the resource is updated. 12945 Etag *string `json:"etag,omitempty"` 12946 // ID - Resource ID. 12947 ID *string `json:"id,omitempty"` 12948} 12949 12950// MarshalJSON is the custom marshaler for ResourceNavigationLink. 12951func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) { 12952 objectMap := make(map[string]interface{}) 12953 if rnl.ResourceNavigationLinkFormat != nil { 12954 objectMap["properties"] = rnl.ResourceNavigationLinkFormat 12955 } 12956 if rnl.Name != nil { 12957 objectMap["name"] = rnl.Name 12958 } 12959 if rnl.Etag != nil { 12960 objectMap["etag"] = rnl.Etag 12961 } 12962 if rnl.ID != nil { 12963 objectMap["id"] = rnl.ID 12964 } 12965 return json.Marshal(objectMap) 12966} 12967 12968// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct. 12969func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error { 12970 var m map[string]*json.RawMessage 12971 err := json.Unmarshal(body, &m) 12972 if err != nil { 12973 return err 12974 } 12975 for k, v := range m { 12976 switch k { 12977 case "properties": 12978 if v != nil { 12979 var resourceNavigationLinkFormat ResourceNavigationLinkFormat 12980 err = json.Unmarshal(*v, &resourceNavigationLinkFormat) 12981 if err != nil { 12982 return err 12983 } 12984 rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat 12985 } 12986 case "name": 12987 if v != nil { 12988 var name string 12989 err = json.Unmarshal(*v, &name) 12990 if err != nil { 12991 return err 12992 } 12993 rnl.Name = &name 12994 } 12995 case "etag": 12996 if v != nil { 12997 var etag string 12998 err = json.Unmarshal(*v, &etag) 12999 if err != nil { 13000 return err 13001 } 13002 rnl.Etag = &etag 13003 } 13004 case "id": 13005 if v != nil { 13006 var ID string 13007 err = json.Unmarshal(*v, &ID) 13008 if err != nil { 13009 return err 13010 } 13011 rnl.ID = &ID 13012 } 13013 } 13014 } 13015 13016 return nil 13017} 13018 13019// ResourceNavigationLinkFormat properties of ResourceNavigationLink. 13020type ResourceNavigationLinkFormat struct { 13021 // LinkedResourceType - Resource type of the linked resource. 13022 LinkedResourceType *string `json:"linkedResourceType,omitempty"` 13023 // Link - Link to the external resource 13024 Link *string `json:"link,omitempty"` 13025 // ProvisioningState - Provisioning state of the ResourceNavigationLink resource. 13026 ProvisioningState *string `json:"provisioningState,omitempty"` 13027} 13028 13029// RetentionPolicyParameters parameters that define the retention policy for flow log. 13030type RetentionPolicyParameters struct { 13031 // Days - Number of days to retain flow log records. 13032 Days *int32 `json:"days,omitempty"` 13033 // Enabled - Flag to enable/disable retention. 13034 Enabled *bool `json:"enabled,omitempty"` 13035} 13036 13037// Route route resource 13038type Route struct { 13039 autorest.Response `json:"-"` 13040 // RoutePropertiesFormat - Properties of the route. 13041 *RoutePropertiesFormat `json:"properties,omitempty"` 13042 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 13043 Name *string `json:"name,omitempty"` 13044 // Etag - A unique read-only string that changes whenever the resource is updated. 13045 Etag *string `json:"etag,omitempty"` 13046 // ID - Resource ID. 13047 ID *string `json:"id,omitempty"` 13048} 13049 13050// MarshalJSON is the custom marshaler for Route. 13051func (r Route) MarshalJSON() ([]byte, error) { 13052 objectMap := make(map[string]interface{}) 13053 if r.RoutePropertiesFormat != nil { 13054 objectMap["properties"] = r.RoutePropertiesFormat 13055 } 13056 if r.Name != nil { 13057 objectMap["name"] = r.Name 13058 } 13059 if r.Etag != nil { 13060 objectMap["etag"] = r.Etag 13061 } 13062 if r.ID != nil { 13063 objectMap["id"] = r.ID 13064 } 13065 return json.Marshal(objectMap) 13066} 13067 13068// UnmarshalJSON is the custom unmarshaler for Route struct. 13069func (r *Route) UnmarshalJSON(body []byte) error { 13070 var m map[string]*json.RawMessage 13071 err := json.Unmarshal(body, &m) 13072 if err != nil { 13073 return err 13074 } 13075 for k, v := range m { 13076 switch k { 13077 case "properties": 13078 if v != nil { 13079 var routePropertiesFormat RoutePropertiesFormat 13080 err = json.Unmarshal(*v, &routePropertiesFormat) 13081 if err != nil { 13082 return err 13083 } 13084 r.RoutePropertiesFormat = &routePropertiesFormat 13085 } 13086 case "name": 13087 if v != nil { 13088 var name string 13089 err = json.Unmarshal(*v, &name) 13090 if err != nil { 13091 return err 13092 } 13093 r.Name = &name 13094 } 13095 case "etag": 13096 if v != nil { 13097 var etag string 13098 err = json.Unmarshal(*v, &etag) 13099 if err != nil { 13100 return err 13101 } 13102 r.Etag = &etag 13103 } 13104 case "id": 13105 if v != nil { 13106 var ID string 13107 err = json.Unmarshal(*v, &ID) 13108 if err != nil { 13109 return err 13110 } 13111 r.ID = &ID 13112 } 13113 } 13114 } 13115 13116 return nil 13117} 13118 13119// RouteFilter route Filter Resource. 13120type RouteFilter struct { 13121 autorest.Response `json:"-"` 13122 *RouteFilterPropertiesFormat `json:"properties,omitempty"` 13123 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 13124 Etag *string `json:"etag,omitempty"` 13125 // ID - Resource ID. 13126 ID *string `json:"id,omitempty"` 13127 // Name - Resource name. 13128 Name *string `json:"name,omitempty"` 13129 // Type - Resource type. 13130 Type *string `json:"type,omitempty"` 13131 // Location - Resource location. 13132 Location *string `json:"location,omitempty"` 13133 // Tags - Resource tags. 13134 Tags map[string]*string `json:"tags"` 13135} 13136 13137// MarshalJSON is the custom marshaler for RouteFilter. 13138func (rf RouteFilter) MarshalJSON() ([]byte, error) { 13139 objectMap := make(map[string]interface{}) 13140 if rf.RouteFilterPropertiesFormat != nil { 13141 objectMap["properties"] = rf.RouteFilterPropertiesFormat 13142 } 13143 if rf.Etag != nil { 13144 objectMap["etag"] = rf.Etag 13145 } 13146 if rf.ID != nil { 13147 objectMap["id"] = rf.ID 13148 } 13149 if rf.Name != nil { 13150 objectMap["name"] = rf.Name 13151 } 13152 if rf.Type != nil { 13153 objectMap["type"] = rf.Type 13154 } 13155 if rf.Location != nil { 13156 objectMap["location"] = rf.Location 13157 } 13158 if rf.Tags != nil { 13159 objectMap["tags"] = rf.Tags 13160 } 13161 return json.Marshal(objectMap) 13162} 13163 13164// UnmarshalJSON is the custom unmarshaler for RouteFilter struct. 13165func (rf *RouteFilter) UnmarshalJSON(body []byte) error { 13166 var m map[string]*json.RawMessage 13167 err := json.Unmarshal(body, &m) 13168 if err != nil { 13169 return err 13170 } 13171 for k, v := range m { 13172 switch k { 13173 case "properties": 13174 if v != nil { 13175 var routeFilterPropertiesFormat RouteFilterPropertiesFormat 13176 err = json.Unmarshal(*v, &routeFilterPropertiesFormat) 13177 if err != nil { 13178 return err 13179 } 13180 rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat 13181 } 13182 case "etag": 13183 if v != nil { 13184 var etag string 13185 err = json.Unmarshal(*v, &etag) 13186 if err != nil { 13187 return err 13188 } 13189 rf.Etag = &etag 13190 } 13191 case "id": 13192 if v != nil { 13193 var ID string 13194 err = json.Unmarshal(*v, &ID) 13195 if err != nil { 13196 return err 13197 } 13198 rf.ID = &ID 13199 } 13200 case "name": 13201 if v != nil { 13202 var name string 13203 err = json.Unmarshal(*v, &name) 13204 if err != nil { 13205 return err 13206 } 13207 rf.Name = &name 13208 } 13209 case "type": 13210 if v != nil { 13211 var typeVar string 13212 err = json.Unmarshal(*v, &typeVar) 13213 if err != nil { 13214 return err 13215 } 13216 rf.Type = &typeVar 13217 } 13218 case "location": 13219 if v != nil { 13220 var location string 13221 err = json.Unmarshal(*v, &location) 13222 if err != nil { 13223 return err 13224 } 13225 rf.Location = &location 13226 } 13227 case "tags": 13228 if v != nil { 13229 var tags map[string]*string 13230 err = json.Unmarshal(*v, &tags) 13231 if err != nil { 13232 return err 13233 } 13234 rf.Tags = tags 13235 } 13236 } 13237 } 13238 13239 return nil 13240} 13241 13242// RouteFilterListResult response for the ListRouteFilters API service call. 13243type RouteFilterListResult struct { 13244 autorest.Response `json:"-"` 13245 // Value - Gets a list of route filters in a resource group. 13246 Value *[]RouteFilter `json:"value,omitempty"` 13247 // NextLink - The URL to get the next set of results. 13248 NextLink *string `json:"nextLink,omitempty"` 13249} 13250 13251// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values. 13252type RouteFilterListResultIterator struct { 13253 i int 13254 page RouteFilterListResultPage 13255} 13256 13257// Next advances to the next value. If there was an error making 13258// the request the iterator does not advance and the error is returned. 13259func (iter *RouteFilterListResultIterator) Next() error { 13260 iter.i++ 13261 if iter.i < len(iter.page.Values()) { 13262 return nil 13263 } 13264 err := iter.page.Next() 13265 if err != nil { 13266 iter.i-- 13267 return err 13268 } 13269 iter.i = 0 13270 return nil 13271} 13272 13273// NotDone returns true if the enumeration should be started or is not yet complete. 13274func (iter RouteFilterListResultIterator) NotDone() bool { 13275 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13276} 13277 13278// Response returns the raw server response from the last page request. 13279func (iter RouteFilterListResultIterator) Response() RouteFilterListResult { 13280 return iter.page.Response() 13281} 13282 13283// Value returns the current value or a zero-initialized value if the 13284// iterator has advanced beyond the end of the collection. 13285func (iter RouteFilterListResultIterator) Value() RouteFilter { 13286 if !iter.page.NotDone() { 13287 return RouteFilter{} 13288 } 13289 return iter.page.Values()[iter.i] 13290} 13291 13292// IsEmpty returns true if the ListResult contains no values. 13293func (rflr RouteFilterListResult) IsEmpty() bool { 13294 return rflr.Value == nil || len(*rflr.Value) == 0 13295} 13296 13297// routeFilterListResultPreparer prepares a request to retrieve the next set of results. 13298// It returns nil if no more results exist. 13299func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request, error) { 13300 if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 { 13301 return nil, nil 13302 } 13303 return autorest.Prepare(&http.Request{}, 13304 autorest.AsJSON(), 13305 autorest.AsGet(), 13306 autorest.WithBaseURL(to.String(rflr.NextLink))) 13307} 13308 13309// RouteFilterListResultPage contains a page of RouteFilter values. 13310type RouteFilterListResultPage struct { 13311 fn func(RouteFilterListResult) (RouteFilterListResult, error) 13312 rflr RouteFilterListResult 13313} 13314 13315// Next advances to the next page of values. If there was an error making 13316// the request the page does not advance and the error is returned. 13317func (page *RouteFilterListResultPage) Next() error { 13318 next, err := page.fn(page.rflr) 13319 if err != nil { 13320 return err 13321 } 13322 page.rflr = next 13323 return nil 13324} 13325 13326// NotDone returns true if the page enumeration should be started or is not yet complete. 13327func (page RouteFilterListResultPage) NotDone() bool { 13328 return !page.rflr.IsEmpty() 13329} 13330 13331// Response returns the raw server response from the last page request. 13332func (page RouteFilterListResultPage) Response() RouteFilterListResult { 13333 return page.rflr 13334} 13335 13336// Values returns the slice of values for the current page or nil if there are no values. 13337func (page RouteFilterListResultPage) Values() []RouteFilter { 13338 if page.rflr.IsEmpty() { 13339 return nil 13340 } 13341 return *page.rflr.Value 13342} 13343 13344// RouteFilterPropertiesFormat route Filter Resource 13345type RouteFilterPropertiesFormat struct { 13346 // Rules - Collection of RouteFilterRules contained within a route filter. 13347 Rules *[]RouteFilterRule `json:"rules,omitempty"` 13348 // Peerings - A collection of references to express route circuit peerings. 13349 Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` 13350 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. 13351 ProvisioningState *string `json:"provisioningState,omitempty"` 13352} 13353 13354// RouteFilterRule route Filter Rule Resource 13355type RouteFilterRule struct { 13356 autorest.Response `json:"-"` 13357 *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` 13358 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 13359 Name *string `json:"name,omitempty"` 13360 // Location - Resource location. 13361 Location *string `json:"location,omitempty"` 13362 // Etag - A unique read-only string that changes whenever the resource is updated. 13363 Etag *string `json:"etag,omitempty"` 13364 // ID - Resource ID. 13365 ID *string `json:"id,omitempty"` 13366} 13367 13368// MarshalJSON is the custom marshaler for RouteFilterRule. 13369func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) { 13370 objectMap := make(map[string]interface{}) 13371 if rfr.RouteFilterRulePropertiesFormat != nil { 13372 objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat 13373 } 13374 if rfr.Name != nil { 13375 objectMap["name"] = rfr.Name 13376 } 13377 if rfr.Location != nil { 13378 objectMap["location"] = rfr.Location 13379 } 13380 if rfr.Etag != nil { 13381 objectMap["etag"] = rfr.Etag 13382 } 13383 if rfr.ID != nil { 13384 objectMap["id"] = rfr.ID 13385 } 13386 return json.Marshal(objectMap) 13387} 13388 13389// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct. 13390func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error { 13391 var m map[string]*json.RawMessage 13392 err := json.Unmarshal(body, &m) 13393 if err != nil { 13394 return err 13395 } 13396 for k, v := range m { 13397 switch k { 13398 case "properties": 13399 if v != nil { 13400 var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat 13401 err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) 13402 if err != nil { 13403 return err 13404 } 13405 rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat 13406 } 13407 case "name": 13408 if v != nil { 13409 var name string 13410 err = json.Unmarshal(*v, &name) 13411 if err != nil { 13412 return err 13413 } 13414 rfr.Name = &name 13415 } 13416 case "location": 13417 if v != nil { 13418 var location string 13419 err = json.Unmarshal(*v, &location) 13420 if err != nil { 13421 return err 13422 } 13423 rfr.Location = &location 13424 } 13425 case "etag": 13426 if v != nil { 13427 var etag string 13428 err = json.Unmarshal(*v, &etag) 13429 if err != nil { 13430 return err 13431 } 13432 rfr.Etag = &etag 13433 } 13434 case "id": 13435 if v != nil { 13436 var ID string 13437 err = json.Unmarshal(*v, &ID) 13438 if err != nil { 13439 return err 13440 } 13441 rfr.ID = &ID 13442 } 13443 } 13444 } 13445 13446 return nil 13447} 13448 13449// RouteFilterRuleListResult response for the ListRouteFilterRules API service call 13450type RouteFilterRuleListResult struct { 13451 autorest.Response `json:"-"` 13452 // Value - Gets a list of RouteFilterRules in a resource group. 13453 Value *[]RouteFilterRule `json:"value,omitempty"` 13454 // NextLink - The URL to get the next set of results. 13455 NextLink *string `json:"nextLink,omitempty"` 13456} 13457 13458// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values. 13459type RouteFilterRuleListResultIterator struct { 13460 i int 13461 page RouteFilterRuleListResultPage 13462} 13463 13464// Next advances to the next value. If there was an error making 13465// the request the iterator does not advance and the error is returned. 13466func (iter *RouteFilterRuleListResultIterator) Next() error { 13467 iter.i++ 13468 if iter.i < len(iter.page.Values()) { 13469 return nil 13470 } 13471 err := iter.page.Next() 13472 if err != nil { 13473 iter.i-- 13474 return err 13475 } 13476 iter.i = 0 13477 return nil 13478} 13479 13480// NotDone returns true if the enumeration should be started or is not yet complete. 13481func (iter RouteFilterRuleListResultIterator) NotDone() bool { 13482 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13483} 13484 13485// Response returns the raw server response from the last page request. 13486func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult { 13487 return iter.page.Response() 13488} 13489 13490// Value returns the current value or a zero-initialized value if the 13491// iterator has advanced beyond the end of the collection. 13492func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule { 13493 if !iter.page.NotDone() { 13494 return RouteFilterRule{} 13495 } 13496 return iter.page.Values()[iter.i] 13497} 13498 13499// IsEmpty returns true if the ListResult contains no values. 13500func (rfrlr RouteFilterRuleListResult) IsEmpty() bool { 13501 return rfrlr.Value == nil || len(*rfrlr.Value) == 0 13502} 13503 13504// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results. 13505// It returns nil if no more results exist. 13506func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*http.Request, error) { 13507 if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 { 13508 return nil, nil 13509 } 13510 return autorest.Prepare(&http.Request{}, 13511 autorest.AsJSON(), 13512 autorest.AsGet(), 13513 autorest.WithBaseURL(to.String(rfrlr.NextLink))) 13514} 13515 13516// RouteFilterRuleListResultPage contains a page of RouteFilterRule values. 13517type RouteFilterRuleListResultPage struct { 13518 fn func(RouteFilterRuleListResult) (RouteFilterRuleListResult, error) 13519 rfrlr RouteFilterRuleListResult 13520} 13521 13522// Next advances to the next page of values. If there was an error making 13523// the request the page does not advance and the error is returned. 13524func (page *RouteFilterRuleListResultPage) Next() error { 13525 next, err := page.fn(page.rfrlr) 13526 if err != nil { 13527 return err 13528 } 13529 page.rfrlr = next 13530 return nil 13531} 13532 13533// NotDone returns true if the page enumeration should be started or is not yet complete. 13534func (page RouteFilterRuleListResultPage) NotDone() bool { 13535 return !page.rfrlr.IsEmpty() 13536} 13537 13538// Response returns the raw server response from the last page request. 13539func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult { 13540 return page.rfrlr 13541} 13542 13543// Values returns the slice of values for the current page or nil if there are no values. 13544func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule { 13545 if page.rfrlr.IsEmpty() { 13546 return nil 13547 } 13548 return *page.rfrlr.Value 13549} 13550 13551// RouteFilterRulePropertiesFormat route Filter Rule Resource 13552type RouteFilterRulePropertiesFormat struct { 13553 // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' 13554 Access Access `json:"access,omitempty"` 13555 // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community' 13556 RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` 13557 // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] 13558 Communities *[]string `json:"communities,omitempty"` 13559 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. 13560 ProvisioningState *string `json:"provisioningState,omitempty"` 13561} 13562 13563// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 13564// operation. 13565type RouteFilterRulesCreateOrUpdateFuture struct { 13566 azure.Future 13567 req *http.Request 13568} 13569 13570// Result returns the result of the asynchronous operation. 13571// If the operation has not completed it will return an error. 13572func (future RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { 13573 var done bool 13574 done, err = future.Done(client) 13575 if err != nil { 13576 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13577 return 13578 } 13579 if !done { 13580 return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture") 13581 } 13582 if future.PollingMethod() == azure.PollingLocation { 13583 rfr, err = client.CreateOrUpdateResponder(future.Response()) 13584 if err != nil { 13585 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 13586 } 13587 return 13588 } 13589 var req *http.Request 13590 var resp *http.Response 13591 if future.PollingURL() != "" { 13592 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13593 if err != nil { 13594 return 13595 } 13596 } else { 13597 req = autorest.ChangeToGet(future.req) 13598 } 13599 resp, err = autorest.SendWithSender(client, req, 13600 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13601 if err != nil { 13602 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 13603 return 13604 } 13605 rfr, err = client.CreateOrUpdateResponder(resp) 13606 if err != nil { 13607 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 13608 } 13609 return 13610} 13611 13612// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 13613// operation. 13614type RouteFilterRulesDeleteFuture struct { 13615 azure.Future 13616 req *http.Request 13617} 13618 13619// Result returns the result of the asynchronous operation. 13620// If the operation has not completed it will return an error. 13621func (future RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) { 13622 var done bool 13623 done, err = future.Done(client) 13624 if err != nil { 13625 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure") 13626 return 13627 } 13628 if !done { 13629 return ar, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture") 13630 } 13631 if future.PollingMethod() == azure.PollingLocation { 13632 ar, err = client.DeleteResponder(future.Response()) 13633 if err != nil { 13634 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Failure responding to request") 13635 } 13636 return 13637 } 13638 var req *http.Request 13639 var resp *http.Response 13640 if future.PollingURL() != "" { 13641 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13642 if err != nil { 13643 return 13644 } 13645 } else { 13646 req = autorest.ChangeToGet(future.req) 13647 } 13648 resp, err = autorest.SendWithSender(client, req, 13649 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13650 if err != nil { 13651 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure sending request") 13652 return 13653 } 13654 ar, err = client.DeleteResponder(resp) 13655 if err != nil { 13656 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", resp, "Failure responding to request") 13657 } 13658 return 13659} 13660 13661// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 13662// operation. 13663type RouteFilterRulesUpdateFuture struct { 13664 azure.Future 13665 req *http.Request 13666} 13667 13668// Result returns the result of the asynchronous operation. 13669// If the operation has not completed it will return an error. 13670func (future RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { 13671 var done bool 13672 done, err = future.Done(client) 13673 if err != nil { 13674 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") 13675 return 13676 } 13677 if !done { 13678 return rfr, azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") 13679 } 13680 if future.PollingMethod() == azure.PollingLocation { 13681 rfr, err = client.UpdateResponder(future.Response()) 13682 if err != nil { 13683 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Failure responding to request") 13684 } 13685 return 13686 } 13687 var req *http.Request 13688 var resp *http.Response 13689 if future.PollingURL() != "" { 13690 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13691 if err != nil { 13692 return 13693 } 13694 } else { 13695 req = autorest.ChangeToGet(future.req) 13696 } 13697 resp, err = autorest.SendWithSender(client, req, 13698 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13699 if err != nil { 13700 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure sending request") 13701 return 13702 } 13703 rfr, err = client.UpdateResponder(resp) 13704 if err != nil { 13705 err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", resp, "Failure responding to request") 13706 } 13707 return 13708} 13709 13710// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 13711// operation. 13712type RouteFiltersCreateOrUpdateFuture struct { 13713 azure.Future 13714 req *http.Request 13715} 13716 13717// Result returns the result of the asynchronous operation. 13718// If the operation has not completed it will return an error. 13719func (future RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { 13720 var done bool 13721 done, err = future.Done(client) 13722 if err != nil { 13723 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13724 return 13725 } 13726 if !done { 13727 return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture") 13728 } 13729 if future.PollingMethod() == azure.PollingLocation { 13730 rf, err = client.CreateOrUpdateResponder(future.Response()) 13731 if err != nil { 13732 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 13733 } 13734 return 13735 } 13736 var req *http.Request 13737 var resp *http.Response 13738 if future.PollingURL() != "" { 13739 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13740 if err != nil { 13741 return 13742 } 13743 } else { 13744 req = autorest.ChangeToGet(future.req) 13745 } 13746 resp, err = autorest.SendWithSender(client, req, 13747 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13748 if err != nil { 13749 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure sending request") 13750 return 13751 } 13752 rf, err = client.CreateOrUpdateResponder(resp) 13753 if err != nil { 13754 err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 13755 } 13756 return 13757} 13758 13759// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 13760type RouteFiltersDeleteFuture struct { 13761 azure.Future 13762 req *http.Request 13763} 13764 13765// Result returns the result of the asynchronous operation. 13766// If the operation has not completed it will return an error. 13767func (future RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) { 13768 var done bool 13769 done, err = future.Done(client) 13770 if err != nil { 13771 err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure") 13772 return 13773 } 13774 if !done { 13775 return ar, azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture") 13776 } 13777 if future.PollingMethod() == azure.PollingLocation { 13778 ar, err = client.DeleteResponder(future.Response()) 13779 if err != nil { 13780 err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Failure responding to request") 13781 } 13782 return 13783 } 13784 var req *http.Request 13785 var resp *http.Response 13786 if future.PollingURL() != "" { 13787 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13788 if err != nil { 13789 return 13790 } 13791 } else { 13792 req = autorest.ChangeToGet(future.req) 13793 } 13794 resp, err = autorest.SendWithSender(client, req, 13795 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13796 if err != nil { 13797 err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure sending request") 13798 return 13799 } 13800 ar, err = client.DeleteResponder(resp) 13801 if err != nil { 13802 err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", resp, "Failure responding to request") 13803 } 13804 return 13805} 13806 13807// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 13808type RouteFiltersUpdateFuture struct { 13809 azure.Future 13810 req *http.Request 13811} 13812 13813// Result returns the result of the asynchronous operation. 13814// If the operation has not completed it will return an error. 13815func (future RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { 13816 var done bool 13817 done, err = future.Done(client) 13818 if err != nil { 13819 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") 13820 return 13821 } 13822 if !done { 13823 return rf, azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") 13824 } 13825 if future.PollingMethod() == azure.PollingLocation { 13826 rf, err = client.UpdateResponder(future.Response()) 13827 if err != nil { 13828 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Failure responding to request") 13829 } 13830 return 13831 } 13832 var req *http.Request 13833 var resp *http.Response 13834 if future.PollingURL() != "" { 13835 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13836 if err != nil { 13837 return 13838 } 13839 } else { 13840 req = autorest.ChangeToGet(future.req) 13841 } 13842 resp, err = autorest.SendWithSender(client, req, 13843 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 13844 if err != nil { 13845 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure sending request") 13846 return 13847 } 13848 rf, err = client.UpdateResponder(resp) 13849 if err != nil { 13850 err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", resp, "Failure responding to request") 13851 } 13852 return 13853} 13854 13855// RouteListResult response for the ListRoute API service call 13856type RouteListResult struct { 13857 autorest.Response `json:"-"` 13858 // Value - Gets a list of routes in a resource group. 13859 Value *[]Route `json:"value,omitempty"` 13860 // NextLink - The URL to get the next set of results. 13861 NextLink *string `json:"nextLink,omitempty"` 13862} 13863 13864// RouteListResultIterator provides access to a complete listing of Route values. 13865type RouteListResultIterator struct { 13866 i int 13867 page RouteListResultPage 13868} 13869 13870// Next advances to the next value. If there was an error making 13871// the request the iterator does not advance and the error is returned. 13872func (iter *RouteListResultIterator) Next() error { 13873 iter.i++ 13874 if iter.i < len(iter.page.Values()) { 13875 return nil 13876 } 13877 err := iter.page.Next() 13878 if err != nil { 13879 iter.i-- 13880 return err 13881 } 13882 iter.i = 0 13883 return nil 13884} 13885 13886// NotDone returns true if the enumeration should be started or is not yet complete. 13887func (iter RouteListResultIterator) NotDone() bool { 13888 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13889} 13890 13891// Response returns the raw server response from the last page request. 13892func (iter RouteListResultIterator) Response() RouteListResult { 13893 return iter.page.Response() 13894} 13895 13896// Value returns the current value or a zero-initialized value if the 13897// iterator has advanced beyond the end of the collection. 13898func (iter RouteListResultIterator) Value() Route { 13899 if !iter.page.NotDone() { 13900 return Route{} 13901 } 13902 return iter.page.Values()[iter.i] 13903} 13904 13905// IsEmpty returns true if the ListResult contains no values. 13906func (rlr RouteListResult) IsEmpty() bool { 13907 return rlr.Value == nil || len(*rlr.Value) == 0 13908} 13909 13910// routeListResultPreparer prepares a request to retrieve the next set of results. 13911// It returns nil if no more results exist. 13912func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) { 13913 if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { 13914 return nil, nil 13915 } 13916 return autorest.Prepare(&http.Request{}, 13917 autorest.AsJSON(), 13918 autorest.AsGet(), 13919 autorest.WithBaseURL(to.String(rlr.NextLink))) 13920} 13921 13922// RouteListResultPage contains a page of Route values. 13923type RouteListResultPage struct { 13924 fn func(RouteListResult) (RouteListResult, error) 13925 rlr RouteListResult 13926} 13927 13928// Next advances to the next page of values. If there was an error making 13929// the request the page does not advance and the error is returned. 13930func (page *RouteListResultPage) Next() error { 13931 next, err := page.fn(page.rlr) 13932 if err != nil { 13933 return err 13934 } 13935 page.rlr = next 13936 return nil 13937} 13938 13939// NotDone returns true if the page enumeration should be started or is not yet complete. 13940func (page RouteListResultPage) NotDone() bool { 13941 return !page.rlr.IsEmpty() 13942} 13943 13944// Response returns the raw server response from the last page request. 13945func (page RouteListResultPage) Response() RouteListResult { 13946 return page.rlr 13947} 13948 13949// Values returns the slice of values for the current page or nil if there are no values. 13950func (page RouteListResultPage) Values() []Route { 13951 if page.rlr.IsEmpty() { 13952 return nil 13953 } 13954 return *page.rlr.Value 13955} 13956 13957// RoutePropertiesFormat route resource 13958type RoutePropertiesFormat struct { 13959 // AddressPrefix - The destination CIDR to which the route applies. 13960 AddressPrefix *string `json:"addressPrefix,omitempty"` 13961 // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' 13962 NextHopType RouteNextHopType `json:"nextHopType,omitempty"` 13963 // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. 13964 NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` 13965 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 13966 ProvisioningState *string `json:"provisioningState,omitempty"` 13967} 13968 13969// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 13970type RoutesCreateOrUpdateFuture struct { 13971 azure.Future 13972 req *http.Request 13973} 13974 13975// Result returns the result of the asynchronous operation. 13976// If the operation has not completed it will return an error. 13977func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) { 13978 var done bool 13979 done, err = future.Done(client) 13980 if err != nil { 13981 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 13982 return 13983 } 13984 if !done { 13985 return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture") 13986 } 13987 if future.PollingMethod() == azure.PollingLocation { 13988 r, err = client.CreateOrUpdateResponder(future.Response()) 13989 if err != nil { 13990 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 13991 } 13992 return 13993 } 13994 var req *http.Request 13995 var resp *http.Response 13996 if future.PollingURL() != "" { 13997 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 13998 if err != nil { 13999 return 14000 } 14001 } else { 14002 req = autorest.ChangeToGet(future.req) 14003 } 14004 resp, err = autorest.SendWithSender(client, req, 14005 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14006 if err != nil { 14007 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 14008 return 14009 } 14010 r, err = client.CreateOrUpdateResponder(resp) 14011 if err != nil { 14012 err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 14013 } 14014 return 14015} 14016 14017// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 14018type RoutesDeleteFuture struct { 14019 azure.Future 14020 req *http.Request 14021} 14022 14023// Result returns the result of the asynchronous operation. 14024// If the operation has not completed it will return an error. 14025func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) { 14026 var done bool 14027 done, err = future.Done(client) 14028 if err != nil { 14029 err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure") 14030 return 14031 } 14032 if !done { 14033 return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture") 14034 } 14035 if future.PollingMethod() == azure.PollingLocation { 14036 ar, err = client.DeleteResponder(future.Response()) 14037 if err != nil { 14038 err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request") 14039 } 14040 return 14041 } 14042 var req *http.Request 14043 var resp *http.Response 14044 if future.PollingURL() != "" { 14045 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14046 if err != nil { 14047 return 14048 } 14049 } else { 14050 req = autorest.ChangeToGet(future.req) 14051 } 14052 resp, err = autorest.SendWithSender(client, req, 14053 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14054 if err != nil { 14055 err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request") 14056 return 14057 } 14058 ar, err = client.DeleteResponder(resp) 14059 if err != nil { 14060 err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request") 14061 } 14062 return 14063} 14064 14065// RouteTable route table resource. 14066type RouteTable struct { 14067 autorest.Response `json:"-"` 14068 // RouteTablePropertiesFormat - Properties of the route table. 14069 *RouteTablePropertiesFormat `json:"properties,omitempty"` 14070 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 14071 Etag *string `json:"etag,omitempty"` 14072 // ID - Resource ID. 14073 ID *string `json:"id,omitempty"` 14074 // Name - Resource name. 14075 Name *string `json:"name,omitempty"` 14076 // Type - Resource type. 14077 Type *string `json:"type,omitempty"` 14078 // Location - Resource location. 14079 Location *string `json:"location,omitempty"` 14080 // Tags - Resource tags. 14081 Tags map[string]*string `json:"tags"` 14082} 14083 14084// MarshalJSON is the custom marshaler for RouteTable. 14085func (rt RouteTable) MarshalJSON() ([]byte, error) { 14086 objectMap := make(map[string]interface{}) 14087 if rt.RouteTablePropertiesFormat != nil { 14088 objectMap["properties"] = rt.RouteTablePropertiesFormat 14089 } 14090 if rt.Etag != nil { 14091 objectMap["etag"] = rt.Etag 14092 } 14093 if rt.ID != nil { 14094 objectMap["id"] = rt.ID 14095 } 14096 if rt.Name != nil { 14097 objectMap["name"] = rt.Name 14098 } 14099 if rt.Type != nil { 14100 objectMap["type"] = rt.Type 14101 } 14102 if rt.Location != nil { 14103 objectMap["location"] = rt.Location 14104 } 14105 if rt.Tags != nil { 14106 objectMap["tags"] = rt.Tags 14107 } 14108 return json.Marshal(objectMap) 14109} 14110 14111// UnmarshalJSON is the custom unmarshaler for RouteTable struct. 14112func (rt *RouteTable) UnmarshalJSON(body []byte) error { 14113 var m map[string]*json.RawMessage 14114 err := json.Unmarshal(body, &m) 14115 if err != nil { 14116 return err 14117 } 14118 for k, v := range m { 14119 switch k { 14120 case "properties": 14121 if v != nil { 14122 var routeTablePropertiesFormat RouteTablePropertiesFormat 14123 err = json.Unmarshal(*v, &routeTablePropertiesFormat) 14124 if err != nil { 14125 return err 14126 } 14127 rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat 14128 } 14129 case "etag": 14130 if v != nil { 14131 var etag string 14132 err = json.Unmarshal(*v, &etag) 14133 if err != nil { 14134 return err 14135 } 14136 rt.Etag = &etag 14137 } 14138 case "id": 14139 if v != nil { 14140 var ID string 14141 err = json.Unmarshal(*v, &ID) 14142 if err != nil { 14143 return err 14144 } 14145 rt.ID = &ID 14146 } 14147 case "name": 14148 if v != nil { 14149 var name string 14150 err = json.Unmarshal(*v, &name) 14151 if err != nil { 14152 return err 14153 } 14154 rt.Name = &name 14155 } 14156 case "type": 14157 if v != nil { 14158 var typeVar string 14159 err = json.Unmarshal(*v, &typeVar) 14160 if err != nil { 14161 return err 14162 } 14163 rt.Type = &typeVar 14164 } 14165 case "location": 14166 if v != nil { 14167 var location string 14168 err = json.Unmarshal(*v, &location) 14169 if err != nil { 14170 return err 14171 } 14172 rt.Location = &location 14173 } 14174 case "tags": 14175 if v != nil { 14176 var tags map[string]*string 14177 err = json.Unmarshal(*v, &tags) 14178 if err != nil { 14179 return err 14180 } 14181 rt.Tags = tags 14182 } 14183 } 14184 } 14185 14186 return nil 14187} 14188 14189// RouteTableListResult response for the ListRouteTable API service call. 14190type RouteTableListResult struct { 14191 autorest.Response `json:"-"` 14192 // Value - Gets a list of route tables in a resource group. 14193 Value *[]RouteTable `json:"value,omitempty"` 14194 // NextLink - The URL to get the next set of results. 14195 NextLink *string `json:"nextLink,omitempty"` 14196} 14197 14198// RouteTableListResultIterator provides access to a complete listing of RouteTable values. 14199type RouteTableListResultIterator struct { 14200 i int 14201 page RouteTableListResultPage 14202} 14203 14204// Next advances to the next value. If there was an error making 14205// the request the iterator does not advance and the error is returned. 14206func (iter *RouteTableListResultIterator) Next() error { 14207 iter.i++ 14208 if iter.i < len(iter.page.Values()) { 14209 return nil 14210 } 14211 err := iter.page.Next() 14212 if err != nil { 14213 iter.i-- 14214 return err 14215 } 14216 iter.i = 0 14217 return nil 14218} 14219 14220// NotDone returns true if the enumeration should be started or is not yet complete. 14221func (iter RouteTableListResultIterator) NotDone() bool { 14222 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14223} 14224 14225// Response returns the raw server response from the last page request. 14226func (iter RouteTableListResultIterator) Response() RouteTableListResult { 14227 return iter.page.Response() 14228} 14229 14230// Value returns the current value or a zero-initialized value if the 14231// iterator has advanced beyond the end of the collection. 14232func (iter RouteTableListResultIterator) Value() RouteTable { 14233 if !iter.page.NotDone() { 14234 return RouteTable{} 14235 } 14236 return iter.page.Values()[iter.i] 14237} 14238 14239// IsEmpty returns true if the ListResult contains no values. 14240func (rtlr RouteTableListResult) IsEmpty() bool { 14241 return rtlr.Value == nil || len(*rtlr.Value) == 0 14242} 14243 14244// routeTableListResultPreparer prepares a request to retrieve the next set of results. 14245// It returns nil if no more results exist. 14246func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) { 14247 if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 { 14248 return nil, nil 14249 } 14250 return autorest.Prepare(&http.Request{}, 14251 autorest.AsJSON(), 14252 autorest.AsGet(), 14253 autorest.WithBaseURL(to.String(rtlr.NextLink))) 14254} 14255 14256// RouteTableListResultPage contains a page of RouteTable values. 14257type RouteTableListResultPage struct { 14258 fn func(RouteTableListResult) (RouteTableListResult, error) 14259 rtlr RouteTableListResult 14260} 14261 14262// Next advances to the next page of values. If there was an error making 14263// the request the page does not advance and the error is returned. 14264func (page *RouteTableListResultPage) Next() error { 14265 next, err := page.fn(page.rtlr) 14266 if err != nil { 14267 return err 14268 } 14269 page.rtlr = next 14270 return nil 14271} 14272 14273// NotDone returns true if the page enumeration should be started or is not yet complete. 14274func (page RouteTableListResultPage) NotDone() bool { 14275 return !page.rtlr.IsEmpty() 14276} 14277 14278// Response returns the raw server response from the last page request. 14279func (page RouteTableListResultPage) Response() RouteTableListResult { 14280 return page.rtlr 14281} 14282 14283// Values returns the slice of values for the current page or nil if there are no values. 14284func (page RouteTableListResultPage) Values() []RouteTable { 14285 if page.rtlr.IsEmpty() { 14286 return nil 14287 } 14288 return *page.rtlr.Value 14289} 14290 14291// RouteTablePropertiesFormat route Table resource 14292type RouteTablePropertiesFormat struct { 14293 // Routes - Collection of routes contained within a route table. 14294 Routes *[]Route `json:"routes,omitempty"` 14295 // Subnets - A collection of references to subnets. 14296 Subnets *[]Subnet `json:"subnets,omitempty"` 14297 // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable. 14298 DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` 14299 // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 14300 ProvisioningState *string `json:"provisioningState,omitempty"` 14301} 14302 14303// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 14304// operation. 14305type RouteTablesCreateOrUpdateFuture struct { 14306 azure.Future 14307 req *http.Request 14308} 14309 14310// Result returns the result of the asynchronous operation. 14311// If the operation has not completed it will return an error. 14312func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { 14313 var done bool 14314 done, err = future.Done(client) 14315 if err != nil { 14316 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 14317 return 14318 } 14319 if !done { 14320 return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture") 14321 } 14322 if future.PollingMethod() == azure.PollingLocation { 14323 rt, err = client.CreateOrUpdateResponder(future.Response()) 14324 if err != nil { 14325 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 14326 } 14327 return 14328 } 14329 var req *http.Request 14330 var resp *http.Response 14331 if future.PollingURL() != "" { 14332 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14333 if err != nil { 14334 return 14335 } 14336 } else { 14337 req = autorest.ChangeToGet(future.req) 14338 } 14339 resp, err = autorest.SendWithSender(client, req, 14340 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14341 if err != nil { 14342 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 14343 return 14344 } 14345 rt, err = client.CreateOrUpdateResponder(resp) 14346 if err != nil { 14347 err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 14348 } 14349 return 14350} 14351 14352// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 14353type RouteTablesDeleteFuture struct { 14354 azure.Future 14355 req *http.Request 14356} 14357 14358// Result returns the result of the asynchronous operation. 14359// If the operation has not completed it will return an error. 14360func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) { 14361 var done bool 14362 done, err = future.Done(client) 14363 if err != nil { 14364 err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure") 14365 return 14366 } 14367 if !done { 14368 return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture") 14369 } 14370 if future.PollingMethod() == azure.PollingLocation { 14371 ar, err = client.DeleteResponder(future.Response()) 14372 if err != nil { 14373 err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request") 14374 } 14375 return 14376 } 14377 var req *http.Request 14378 var resp *http.Response 14379 if future.PollingURL() != "" { 14380 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14381 if err != nil { 14382 return 14383 } 14384 } else { 14385 req = autorest.ChangeToGet(future.req) 14386 } 14387 resp, err = autorest.SendWithSender(client, req, 14388 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14389 if err != nil { 14390 err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request") 14391 return 14392 } 14393 ar, err = client.DeleteResponder(resp) 14394 if err != nil { 14395 err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request") 14396 } 14397 return 14398} 14399 14400// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 14401// operation. 14402type RouteTablesUpdateTagsFuture struct { 14403 azure.Future 14404 req *http.Request 14405} 14406 14407// Result returns the result of the asynchronous operation. 14408// If the operation has not completed it will return an error. 14409func (future RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { 14410 var done bool 14411 done, err = future.Done(client) 14412 if err != nil { 14413 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") 14414 return 14415 } 14416 if !done { 14417 return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") 14418 } 14419 if future.PollingMethod() == azure.PollingLocation { 14420 rt, err = client.UpdateTagsResponder(future.Response()) 14421 if err != nil { 14422 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 14423 } 14424 return 14425 } 14426 var req *http.Request 14427 var resp *http.Response 14428 if future.PollingURL() != "" { 14429 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14430 if err != nil { 14431 return 14432 } 14433 } else { 14434 req = autorest.ChangeToGet(future.req) 14435 } 14436 resp, err = autorest.SendWithSender(client, req, 14437 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14438 if err != nil { 14439 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure sending request") 14440 return 14441 } 14442 rt, err = client.UpdateTagsResponder(resp) 14443 if err != nil { 14444 err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", resp, "Failure responding to request") 14445 } 14446 return 14447} 14448 14449// SecurityGroup networkSecurityGroup resource. 14450type SecurityGroup struct { 14451 autorest.Response `json:"-"` 14452 // SecurityGroupPropertiesFormat - Properties of the network security group 14453 *SecurityGroupPropertiesFormat `json:"properties,omitempty"` 14454 // Etag - A unique read-only string that changes whenever the resource is updated. 14455 Etag *string `json:"etag,omitempty"` 14456 // ID - Resource ID. 14457 ID *string `json:"id,omitempty"` 14458 // Name - Resource name. 14459 Name *string `json:"name,omitempty"` 14460 // Type - Resource type. 14461 Type *string `json:"type,omitempty"` 14462 // Location - Resource location. 14463 Location *string `json:"location,omitempty"` 14464 // Tags - Resource tags. 14465 Tags map[string]*string `json:"tags"` 14466} 14467 14468// MarshalJSON is the custom marshaler for SecurityGroup. 14469func (sg SecurityGroup) MarshalJSON() ([]byte, error) { 14470 objectMap := make(map[string]interface{}) 14471 if sg.SecurityGroupPropertiesFormat != nil { 14472 objectMap["properties"] = sg.SecurityGroupPropertiesFormat 14473 } 14474 if sg.Etag != nil { 14475 objectMap["etag"] = sg.Etag 14476 } 14477 if sg.ID != nil { 14478 objectMap["id"] = sg.ID 14479 } 14480 if sg.Name != nil { 14481 objectMap["name"] = sg.Name 14482 } 14483 if sg.Type != nil { 14484 objectMap["type"] = sg.Type 14485 } 14486 if sg.Location != nil { 14487 objectMap["location"] = sg.Location 14488 } 14489 if sg.Tags != nil { 14490 objectMap["tags"] = sg.Tags 14491 } 14492 return json.Marshal(objectMap) 14493} 14494 14495// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct. 14496func (sg *SecurityGroup) UnmarshalJSON(body []byte) error { 14497 var m map[string]*json.RawMessage 14498 err := json.Unmarshal(body, &m) 14499 if err != nil { 14500 return err 14501 } 14502 for k, v := range m { 14503 switch k { 14504 case "properties": 14505 if v != nil { 14506 var securityGroupPropertiesFormat SecurityGroupPropertiesFormat 14507 err = json.Unmarshal(*v, &securityGroupPropertiesFormat) 14508 if err != nil { 14509 return err 14510 } 14511 sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat 14512 } 14513 case "etag": 14514 if v != nil { 14515 var etag string 14516 err = json.Unmarshal(*v, &etag) 14517 if err != nil { 14518 return err 14519 } 14520 sg.Etag = &etag 14521 } 14522 case "id": 14523 if v != nil { 14524 var ID string 14525 err = json.Unmarshal(*v, &ID) 14526 if err != nil { 14527 return err 14528 } 14529 sg.ID = &ID 14530 } 14531 case "name": 14532 if v != nil { 14533 var name string 14534 err = json.Unmarshal(*v, &name) 14535 if err != nil { 14536 return err 14537 } 14538 sg.Name = &name 14539 } 14540 case "type": 14541 if v != nil { 14542 var typeVar string 14543 err = json.Unmarshal(*v, &typeVar) 14544 if err != nil { 14545 return err 14546 } 14547 sg.Type = &typeVar 14548 } 14549 case "location": 14550 if v != nil { 14551 var location string 14552 err = json.Unmarshal(*v, &location) 14553 if err != nil { 14554 return err 14555 } 14556 sg.Location = &location 14557 } 14558 case "tags": 14559 if v != nil { 14560 var tags map[string]*string 14561 err = json.Unmarshal(*v, &tags) 14562 if err != nil { 14563 return err 14564 } 14565 sg.Tags = tags 14566 } 14567 } 14568 } 14569 14570 return nil 14571} 14572 14573// SecurityGroupListResult response for ListNetworkSecurityGroups API service call. 14574type SecurityGroupListResult struct { 14575 autorest.Response `json:"-"` 14576 // Value - A list of NetworkSecurityGroup resources. 14577 Value *[]SecurityGroup `json:"value,omitempty"` 14578 // NextLink - The URL to get the next set of results. 14579 NextLink *string `json:"nextLink,omitempty"` 14580} 14581 14582// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values. 14583type SecurityGroupListResultIterator struct { 14584 i int 14585 page SecurityGroupListResultPage 14586} 14587 14588// Next advances to the next value. If there was an error making 14589// the request the iterator does not advance and the error is returned. 14590func (iter *SecurityGroupListResultIterator) Next() error { 14591 iter.i++ 14592 if iter.i < len(iter.page.Values()) { 14593 return nil 14594 } 14595 err := iter.page.Next() 14596 if err != nil { 14597 iter.i-- 14598 return err 14599 } 14600 iter.i = 0 14601 return nil 14602} 14603 14604// NotDone returns true if the enumeration should be started or is not yet complete. 14605func (iter SecurityGroupListResultIterator) NotDone() bool { 14606 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14607} 14608 14609// Response returns the raw server response from the last page request. 14610func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult { 14611 return iter.page.Response() 14612} 14613 14614// Value returns the current value or a zero-initialized value if the 14615// iterator has advanced beyond the end of the collection. 14616func (iter SecurityGroupListResultIterator) Value() SecurityGroup { 14617 if !iter.page.NotDone() { 14618 return SecurityGroup{} 14619 } 14620 return iter.page.Values()[iter.i] 14621} 14622 14623// IsEmpty returns true if the ListResult contains no values. 14624func (sglr SecurityGroupListResult) IsEmpty() bool { 14625 return sglr.Value == nil || len(*sglr.Value) == 0 14626} 14627 14628// securityGroupListResultPreparer prepares a request to retrieve the next set of results. 14629// It returns nil if no more results exist. 14630func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) { 14631 if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 { 14632 return nil, nil 14633 } 14634 return autorest.Prepare(&http.Request{}, 14635 autorest.AsJSON(), 14636 autorest.AsGet(), 14637 autorest.WithBaseURL(to.String(sglr.NextLink))) 14638} 14639 14640// SecurityGroupListResultPage contains a page of SecurityGroup values. 14641type SecurityGroupListResultPage struct { 14642 fn func(SecurityGroupListResult) (SecurityGroupListResult, error) 14643 sglr SecurityGroupListResult 14644} 14645 14646// Next advances to the next page of values. If there was an error making 14647// the request the page does not advance and the error is returned. 14648func (page *SecurityGroupListResultPage) Next() error { 14649 next, err := page.fn(page.sglr) 14650 if err != nil { 14651 return err 14652 } 14653 page.sglr = next 14654 return nil 14655} 14656 14657// NotDone returns true if the page enumeration should be started or is not yet complete. 14658func (page SecurityGroupListResultPage) NotDone() bool { 14659 return !page.sglr.IsEmpty() 14660} 14661 14662// Response returns the raw server response from the last page request. 14663func (page SecurityGroupListResultPage) Response() SecurityGroupListResult { 14664 return page.sglr 14665} 14666 14667// Values returns the slice of values for the current page or nil if there are no values. 14668func (page SecurityGroupListResultPage) Values() []SecurityGroup { 14669 if page.sglr.IsEmpty() { 14670 return nil 14671 } 14672 return *page.sglr.Value 14673} 14674 14675// SecurityGroupNetworkInterface network interface and all its associated security rules. 14676type SecurityGroupNetworkInterface struct { 14677 // ID - ID of the network interface. 14678 ID *string `json:"id,omitempty"` 14679 SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` 14680} 14681 14682// SecurityGroupPropertiesFormat network Security Group resource. 14683type SecurityGroupPropertiesFormat struct { 14684 // SecurityRules - A collection of security rules of the network security group. 14685 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 14686 // DefaultSecurityRules - The default security rules of network security group. 14687 DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` 14688 // NetworkInterfaces - A collection of references to network interfaces. 14689 NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` 14690 // Subnets - A collection of references to subnets. 14691 Subnets *[]Subnet `json:"subnets,omitempty"` 14692 // ResourceGUID - The resource GUID property of the network security group resource. 14693 ResourceGUID *string `json:"resourceGuid,omitempty"` 14694 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 14695 ProvisioningState *string `json:"provisioningState,omitempty"` 14696} 14697 14698// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 14699// operation. 14700type SecurityGroupsCreateOrUpdateFuture struct { 14701 azure.Future 14702 req *http.Request 14703} 14704 14705// Result returns the result of the asynchronous operation. 14706// If the operation has not completed it will return an error. 14707func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { 14708 var done bool 14709 done, err = future.Done(client) 14710 if err != nil { 14711 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 14712 return 14713 } 14714 if !done { 14715 return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture") 14716 } 14717 if future.PollingMethod() == azure.PollingLocation { 14718 sg, err = client.CreateOrUpdateResponder(future.Response()) 14719 if err != nil { 14720 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 14721 } 14722 return 14723 } 14724 var req *http.Request 14725 var resp *http.Response 14726 if future.PollingURL() != "" { 14727 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14728 if err != nil { 14729 return 14730 } 14731 } else { 14732 req = autorest.ChangeToGet(future.req) 14733 } 14734 resp, err = autorest.SendWithSender(client, req, 14735 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14736 if err != nil { 14737 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 14738 return 14739 } 14740 sg, err = client.CreateOrUpdateResponder(resp) 14741 if err != nil { 14742 err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 14743 } 14744 return 14745} 14746 14747// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 14748type SecurityGroupsDeleteFuture struct { 14749 azure.Future 14750 req *http.Request 14751} 14752 14753// Result returns the result of the asynchronous operation. 14754// If the operation has not completed it will return an error. 14755func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) { 14756 var done bool 14757 done, err = future.Done(client) 14758 if err != nil { 14759 err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure") 14760 return 14761 } 14762 if !done { 14763 return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture") 14764 } 14765 if future.PollingMethod() == azure.PollingLocation { 14766 ar, err = client.DeleteResponder(future.Response()) 14767 if err != nil { 14768 err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request") 14769 } 14770 return 14771 } 14772 var req *http.Request 14773 var resp *http.Response 14774 if future.PollingURL() != "" { 14775 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14776 if err != nil { 14777 return 14778 } 14779 } else { 14780 req = autorest.ChangeToGet(future.req) 14781 } 14782 resp, err = autorest.SendWithSender(client, req, 14783 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14784 if err != nil { 14785 err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request") 14786 return 14787 } 14788 ar, err = client.DeleteResponder(resp) 14789 if err != nil { 14790 err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request") 14791 } 14792 return 14793} 14794 14795// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 14796// operation. 14797type SecurityGroupsUpdateTagsFuture struct { 14798 azure.Future 14799 req *http.Request 14800} 14801 14802// Result returns the result of the asynchronous operation. 14803// If the operation has not completed it will return an error. 14804func (future SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { 14805 var done bool 14806 done, err = future.Done(client) 14807 if err != nil { 14808 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 14809 return 14810 } 14811 if !done { 14812 return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") 14813 } 14814 if future.PollingMethod() == azure.PollingLocation { 14815 sg, err = client.UpdateTagsResponder(future.Response()) 14816 if err != nil { 14817 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 14818 } 14819 return 14820 } 14821 var req *http.Request 14822 var resp *http.Response 14823 if future.PollingURL() != "" { 14824 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 14825 if err != nil { 14826 return 14827 } 14828 } else { 14829 req = autorest.ChangeToGet(future.req) 14830 } 14831 resp, err = autorest.SendWithSender(client, req, 14832 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 14833 if err != nil { 14834 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure sending request") 14835 return 14836 } 14837 sg, err = client.UpdateTagsResponder(resp) 14838 if err != nil { 14839 err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", resp, "Failure responding to request") 14840 } 14841 return 14842} 14843 14844// SecurityGroupViewParameters parameters that define the VM to check security groups for. 14845type SecurityGroupViewParameters struct { 14846 // TargetResourceID - ID of the target VM. 14847 TargetResourceID *string `json:"targetResourceId,omitempty"` 14848} 14849 14850// SecurityGroupViewResult the information about security rules applied to the specified VM. 14851type SecurityGroupViewResult struct { 14852 autorest.Response `json:"-"` 14853 // NetworkInterfaces - List of network interfaces on the specified VM. 14854 NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` 14855} 14856 14857// SecurityRule network security rule. 14858type SecurityRule struct { 14859 autorest.Response `json:"-"` 14860 // SecurityRulePropertiesFormat - Properties of the security rule 14861 *SecurityRulePropertiesFormat `json:"properties,omitempty"` 14862 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 14863 Name *string `json:"name,omitempty"` 14864 // Etag - A unique read-only string that changes whenever the resource is updated. 14865 Etag *string `json:"etag,omitempty"` 14866 // ID - Resource ID. 14867 ID *string `json:"id,omitempty"` 14868} 14869 14870// MarshalJSON is the custom marshaler for SecurityRule. 14871func (sr SecurityRule) MarshalJSON() ([]byte, error) { 14872 objectMap := make(map[string]interface{}) 14873 if sr.SecurityRulePropertiesFormat != nil { 14874 objectMap["properties"] = sr.SecurityRulePropertiesFormat 14875 } 14876 if sr.Name != nil { 14877 objectMap["name"] = sr.Name 14878 } 14879 if sr.Etag != nil { 14880 objectMap["etag"] = sr.Etag 14881 } 14882 if sr.ID != nil { 14883 objectMap["id"] = sr.ID 14884 } 14885 return json.Marshal(objectMap) 14886} 14887 14888// UnmarshalJSON is the custom unmarshaler for SecurityRule struct. 14889func (sr *SecurityRule) UnmarshalJSON(body []byte) error { 14890 var m map[string]*json.RawMessage 14891 err := json.Unmarshal(body, &m) 14892 if err != nil { 14893 return err 14894 } 14895 for k, v := range m { 14896 switch k { 14897 case "properties": 14898 if v != nil { 14899 var securityRulePropertiesFormat SecurityRulePropertiesFormat 14900 err = json.Unmarshal(*v, &securityRulePropertiesFormat) 14901 if err != nil { 14902 return err 14903 } 14904 sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat 14905 } 14906 case "name": 14907 if v != nil { 14908 var name string 14909 err = json.Unmarshal(*v, &name) 14910 if err != nil { 14911 return err 14912 } 14913 sr.Name = &name 14914 } 14915 case "etag": 14916 if v != nil { 14917 var etag string 14918 err = json.Unmarshal(*v, &etag) 14919 if err != nil { 14920 return err 14921 } 14922 sr.Etag = &etag 14923 } 14924 case "id": 14925 if v != nil { 14926 var ID string 14927 err = json.Unmarshal(*v, &ID) 14928 if err != nil { 14929 return err 14930 } 14931 sr.ID = &ID 14932 } 14933 } 14934 } 14935 14936 return nil 14937} 14938 14939// SecurityRuleAssociations all security rules associated with the network interface. 14940type SecurityRuleAssociations struct { 14941 NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` 14942 SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` 14943 // DefaultSecurityRules - Collection of default security rules of the network security group. 14944 DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` 14945 // EffectiveSecurityRules - Collection of effective security rules. 14946 EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` 14947} 14948 14949// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs 14950// to a network security group. 14951type SecurityRuleListResult struct { 14952 autorest.Response `json:"-"` 14953 // Value - The security rules in a network security group. 14954 Value *[]SecurityRule `json:"value,omitempty"` 14955 // NextLink - The URL to get the next set of results. 14956 NextLink *string `json:"nextLink,omitempty"` 14957} 14958 14959// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values. 14960type SecurityRuleListResultIterator struct { 14961 i int 14962 page SecurityRuleListResultPage 14963} 14964 14965// Next advances to the next value. If there was an error making 14966// the request the iterator does not advance and the error is returned. 14967func (iter *SecurityRuleListResultIterator) Next() error { 14968 iter.i++ 14969 if iter.i < len(iter.page.Values()) { 14970 return nil 14971 } 14972 err := iter.page.Next() 14973 if err != nil { 14974 iter.i-- 14975 return err 14976 } 14977 iter.i = 0 14978 return nil 14979} 14980 14981// NotDone returns true if the enumeration should be started or is not yet complete. 14982func (iter SecurityRuleListResultIterator) NotDone() bool { 14983 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14984} 14985 14986// Response returns the raw server response from the last page request. 14987func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult { 14988 return iter.page.Response() 14989} 14990 14991// Value returns the current value or a zero-initialized value if the 14992// iterator has advanced beyond the end of the collection. 14993func (iter SecurityRuleListResultIterator) Value() SecurityRule { 14994 if !iter.page.NotDone() { 14995 return SecurityRule{} 14996 } 14997 return iter.page.Values()[iter.i] 14998} 14999 15000// IsEmpty returns true if the ListResult contains no values. 15001func (srlr SecurityRuleListResult) IsEmpty() bool { 15002 return srlr.Value == nil || len(*srlr.Value) == 0 15003} 15004 15005// securityRuleListResultPreparer prepares a request to retrieve the next set of results. 15006// It returns nil if no more results exist. 15007func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) { 15008 if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 { 15009 return nil, nil 15010 } 15011 return autorest.Prepare(&http.Request{}, 15012 autorest.AsJSON(), 15013 autorest.AsGet(), 15014 autorest.WithBaseURL(to.String(srlr.NextLink))) 15015} 15016 15017// SecurityRuleListResultPage contains a page of SecurityRule values. 15018type SecurityRuleListResultPage struct { 15019 fn func(SecurityRuleListResult) (SecurityRuleListResult, error) 15020 srlr SecurityRuleListResult 15021} 15022 15023// Next advances to the next page of values. If there was an error making 15024// the request the page does not advance and the error is returned. 15025func (page *SecurityRuleListResultPage) Next() error { 15026 next, err := page.fn(page.srlr) 15027 if err != nil { 15028 return err 15029 } 15030 page.srlr = next 15031 return nil 15032} 15033 15034// NotDone returns true if the page enumeration should be started or is not yet complete. 15035func (page SecurityRuleListResultPage) NotDone() bool { 15036 return !page.srlr.IsEmpty() 15037} 15038 15039// Response returns the raw server response from the last page request. 15040func (page SecurityRuleListResultPage) Response() SecurityRuleListResult { 15041 return page.srlr 15042} 15043 15044// Values returns the slice of values for the current page or nil if there are no values. 15045func (page SecurityRuleListResultPage) Values() []SecurityRule { 15046 if page.srlr.IsEmpty() { 15047 return nil 15048 } 15049 return *page.srlr.Value 15050} 15051 15052// SecurityRulePropertiesFormat security rule resource. 15053type SecurityRulePropertiesFormat struct { 15054 // Description - A description for this rule. Restricted to 140 chars. 15055 Description *string `json:"description,omitempty"` 15056 // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk' 15057 Protocol SecurityRuleProtocol `json:"protocol,omitempty"` 15058 // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. 15059 SourcePortRange *string `json:"sourcePortRange,omitempty"` 15060 // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. 15061 DestinationPortRange *string `json:"destinationPortRange,omitempty"` 15062 // SourceAddressPrefix - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. 15063 SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` 15064 // SourceAddressPrefixes - The CIDR or source IP ranges. 15065 SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` 15066 // SourceApplicationSecurityGroups - The application security group specified as source. 15067 SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` 15068 // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. 15069 DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` 15070 // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges. 15071 DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` 15072 // DestinationApplicationSecurityGroups - The application security group specified as destination. 15073 DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` 15074 // SourcePortRanges - The source port ranges. 15075 SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` 15076 // DestinationPortRanges - The destination port ranges. 15077 DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` 15078 // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' 15079 Access SecurityRuleAccess `json:"access,omitempty"` 15080 // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. 15081 Priority *int32 `json:"priority,omitempty"` 15082 // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' 15083 Direction SecurityRuleDirection `json:"direction,omitempty"` 15084 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 15085 ProvisioningState *string `json:"provisioningState,omitempty"` 15086} 15087 15088// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 15089// operation. 15090type SecurityRulesCreateOrUpdateFuture struct { 15091 azure.Future 15092 req *http.Request 15093} 15094 15095// Result returns the result of the asynchronous operation. 15096// If the operation has not completed it will return an error. 15097func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) { 15098 var done bool 15099 done, err = future.Done(client) 15100 if err != nil { 15101 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 15102 return 15103 } 15104 if !done { 15105 return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture") 15106 } 15107 if future.PollingMethod() == azure.PollingLocation { 15108 sr, err = client.CreateOrUpdateResponder(future.Response()) 15109 if err != nil { 15110 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 15111 } 15112 return 15113 } 15114 var req *http.Request 15115 var resp *http.Response 15116 if future.PollingURL() != "" { 15117 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 15118 if err != nil { 15119 return 15120 } 15121 } else { 15122 req = autorest.ChangeToGet(future.req) 15123 } 15124 resp, err = autorest.SendWithSender(client, req, 15125 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15126 if err != nil { 15127 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request") 15128 return 15129 } 15130 sr, err = client.CreateOrUpdateResponder(resp) 15131 if err != nil { 15132 err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 15133 } 15134 return 15135} 15136 15137// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 15138type SecurityRulesDeleteFuture struct { 15139 azure.Future 15140 req *http.Request 15141} 15142 15143// Result returns the result of the asynchronous operation. 15144// If the operation has not completed it will return an error. 15145func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) { 15146 var done bool 15147 done, err = future.Done(client) 15148 if err != nil { 15149 err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure") 15150 return 15151 } 15152 if !done { 15153 return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture") 15154 } 15155 if future.PollingMethod() == azure.PollingLocation { 15156 ar, err = client.DeleteResponder(future.Response()) 15157 if err != nil { 15158 err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request") 15159 } 15160 return 15161 } 15162 var req *http.Request 15163 var resp *http.Response 15164 if future.PollingURL() != "" { 15165 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 15166 if err != nil { 15167 return 15168 } 15169 } else { 15170 req = autorest.ChangeToGet(future.req) 15171 } 15172 resp, err = autorest.SendWithSender(client, req, 15173 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15174 if err != nil { 15175 err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request") 15176 return 15177 } 15178 ar, err = client.DeleteResponder(resp) 15179 if err != nil { 15180 err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request") 15181 } 15182 return 15183} 15184 15185// ServiceEndpointPropertiesFormat the service endpoint properties. 15186type ServiceEndpointPropertiesFormat struct { 15187 // Service - The type of the endpoint service. 15188 Service *string `json:"service,omitempty"` 15189 // Locations - A list of locations. 15190 Locations *[]string `json:"locations,omitempty"` 15191 // ProvisioningState - The provisioning state of the resource. 15192 ProvisioningState *string `json:"provisioningState,omitempty"` 15193} 15194 15195// String ... 15196type String struct { 15197 autorest.Response `json:"-"` 15198 Value *string `json:"value,omitempty"` 15199} 15200 15201// Subnet subnet in a virtual network resource. 15202type Subnet struct { 15203 autorest.Response `json:"-"` 15204 // SubnetPropertiesFormat - Properties of the subnet. 15205 *SubnetPropertiesFormat `json:"properties,omitempty"` 15206 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 15207 Name *string `json:"name,omitempty"` 15208 // Etag - A unique read-only string that changes whenever the resource is updated. 15209 Etag *string `json:"etag,omitempty"` 15210 // ID - Resource ID. 15211 ID *string `json:"id,omitempty"` 15212} 15213 15214// MarshalJSON is the custom marshaler for Subnet. 15215func (s Subnet) MarshalJSON() ([]byte, error) { 15216 objectMap := make(map[string]interface{}) 15217 if s.SubnetPropertiesFormat != nil { 15218 objectMap["properties"] = s.SubnetPropertiesFormat 15219 } 15220 if s.Name != nil { 15221 objectMap["name"] = s.Name 15222 } 15223 if s.Etag != nil { 15224 objectMap["etag"] = s.Etag 15225 } 15226 if s.ID != nil { 15227 objectMap["id"] = s.ID 15228 } 15229 return json.Marshal(objectMap) 15230} 15231 15232// UnmarshalJSON is the custom unmarshaler for Subnet struct. 15233func (s *Subnet) UnmarshalJSON(body []byte) error { 15234 var m map[string]*json.RawMessage 15235 err := json.Unmarshal(body, &m) 15236 if err != nil { 15237 return err 15238 } 15239 for k, v := range m { 15240 switch k { 15241 case "properties": 15242 if v != nil { 15243 var subnetPropertiesFormat SubnetPropertiesFormat 15244 err = json.Unmarshal(*v, &subnetPropertiesFormat) 15245 if err != nil { 15246 return err 15247 } 15248 s.SubnetPropertiesFormat = &subnetPropertiesFormat 15249 } 15250 case "name": 15251 if v != nil { 15252 var name string 15253 err = json.Unmarshal(*v, &name) 15254 if err != nil { 15255 return err 15256 } 15257 s.Name = &name 15258 } 15259 case "etag": 15260 if v != nil { 15261 var etag string 15262 err = json.Unmarshal(*v, &etag) 15263 if err != nil { 15264 return err 15265 } 15266 s.Etag = &etag 15267 } 15268 case "id": 15269 if v != nil { 15270 var ID string 15271 err = json.Unmarshal(*v, &ID) 15272 if err != nil { 15273 return err 15274 } 15275 s.ID = &ID 15276 } 15277 } 15278 } 15279 15280 return nil 15281} 15282 15283// SubnetAssociation network interface and its custom security rules. 15284type SubnetAssociation struct { 15285 // ID - Subnet ID. 15286 ID *string `json:"id,omitempty"` 15287 // SecurityRules - Collection of custom security rules. 15288 SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` 15289} 15290 15291// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network 15292type SubnetListResult struct { 15293 autorest.Response `json:"-"` 15294 // Value - The subnets in a virtual network. 15295 Value *[]Subnet `json:"value,omitempty"` 15296 // NextLink - The URL to get the next set of results. 15297 NextLink *string `json:"nextLink,omitempty"` 15298} 15299 15300// SubnetListResultIterator provides access to a complete listing of Subnet values. 15301type SubnetListResultIterator struct { 15302 i int 15303 page SubnetListResultPage 15304} 15305 15306// Next advances to the next value. If there was an error making 15307// the request the iterator does not advance and the error is returned. 15308func (iter *SubnetListResultIterator) Next() error { 15309 iter.i++ 15310 if iter.i < len(iter.page.Values()) { 15311 return nil 15312 } 15313 err := iter.page.Next() 15314 if err != nil { 15315 iter.i-- 15316 return err 15317 } 15318 iter.i = 0 15319 return nil 15320} 15321 15322// NotDone returns true if the enumeration should be started or is not yet complete. 15323func (iter SubnetListResultIterator) NotDone() bool { 15324 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15325} 15326 15327// Response returns the raw server response from the last page request. 15328func (iter SubnetListResultIterator) Response() SubnetListResult { 15329 return iter.page.Response() 15330} 15331 15332// Value returns the current value or a zero-initialized value if the 15333// iterator has advanced beyond the end of the collection. 15334func (iter SubnetListResultIterator) Value() Subnet { 15335 if !iter.page.NotDone() { 15336 return Subnet{} 15337 } 15338 return iter.page.Values()[iter.i] 15339} 15340 15341// IsEmpty returns true if the ListResult contains no values. 15342func (slr SubnetListResult) IsEmpty() bool { 15343 return slr.Value == nil || len(*slr.Value) == 0 15344} 15345 15346// subnetListResultPreparer prepares a request to retrieve the next set of results. 15347// It returns nil if no more results exist. 15348func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) { 15349 if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 { 15350 return nil, nil 15351 } 15352 return autorest.Prepare(&http.Request{}, 15353 autorest.AsJSON(), 15354 autorest.AsGet(), 15355 autorest.WithBaseURL(to.String(slr.NextLink))) 15356} 15357 15358// SubnetListResultPage contains a page of Subnet values. 15359type SubnetListResultPage struct { 15360 fn func(SubnetListResult) (SubnetListResult, error) 15361 slr SubnetListResult 15362} 15363 15364// Next advances to the next page of values. If there was an error making 15365// the request the page does not advance and the error is returned. 15366func (page *SubnetListResultPage) Next() error { 15367 next, err := page.fn(page.slr) 15368 if err != nil { 15369 return err 15370 } 15371 page.slr = next 15372 return nil 15373} 15374 15375// NotDone returns true if the page enumeration should be started or is not yet complete. 15376func (page SubnetListResultPage) NotDone() bool { 15377 return !page.slr.IsEmpty() 15378} 15379 15380// Response returns the raw server response from the last page request. 15381func (page SubnetListResultPage) Response() SubnetListResult { 15382 return page.slr 15383} 15384 15385// Values returns the slice of values for the current page or nil if there are no values. 15386func (page SubnetListResultPage) Values() []Subnet { 15387 if page.slr.IsEmpty() { 15388 return nil 15389 } 15390 return *page.slr.Value 15391} 15392 15393// SubnetPropertiesFormat properties of the subnet. 15394type SubnetPropertiesFormat struct { 15395 // AddressPrefix - The address prefix for the subnet. 15396 AddressPrefix *string `json:"addressPrefix,omitempty"` 15397 // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. 15398 NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` 15399 // RouteTable - The reference of the RouteTable resource. 15400 RouteTable *RouteTable `json:"routeTable,omitempty"` 15401 // ServiceEndpoints - An array of service endpoints. 15402 ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` 15403 // IPConfigurations - Gets an array of references to the network interface IP configurations using subnet. 15404 IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` 15405 // ResourceNavigationLinks - Gets an array of references to the external resources using subnet. 15406 ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` 15407 // ProvisioningState - The provisioning state of the resource. 15408 ProvisioningState *string `json:"provisioningState,omitempty"` 15409} 15410 15411// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 15412// operation. 15413type SubnetsCreateOrUpdateFuture struct { 15414 azure.Future 15415 req *http.Request 15416} 15417 15418// Result returns the result of the asynchronous operation. 15419// If the operation has not completed it will return an error. 15420func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) { 15421 var done bool 15422 done, err = future.Done(client) 15423 if err != nil { 15424 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 15425 return 15426 } 15427 if !done { 15428 return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture") 15429 } 15430 if future.PollingMethod() == azure.PollingLocation { 15431 s, err = client.CreateOrUpdateResponder(future.Response()) 15432 if err != nil { 15433 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 15434 } 15435 return 15436 } 15437 var req *http.Request 15438 var resp *http.Response 15439 if future.PollingURL() != "" { 15440 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 15441 if err != nil { 15442 return 15443 } 15444 } else { 15445 req = autorest.ChangeToGet(future.req) 15446 } 15447 resp, err = autorest.SendWithSender(client, req, 15448 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15449 if err != nil { 15450 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 15451 return 15452 } 15453 s, err = client.CreateOrUpdateResponder(resp) 15454 if err != nil { 15455 err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 15456 } 15457 return 15458} 15459 15460// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 15461type SubnetsDeleteFuture struct { 15462 azure.Future 15463 req *http.Request 15464} 15465 15466// Result returns the result of the asynchronous operation. 15467// If the operation has not completed it will return an error. 15468func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { 15469 var done bool 15470 done, err = future.Done(client) 15471 if err != nil { 15472 err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure") 15473 return 15474 } 15475 if !done { 15476 return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture") 15477 } 15478 if future.PollingMethod() == azure.PollingLocation { 15479 ar, err = client.DeleteResponder(future.Response()) 15480 if err != nil { 15481 err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request") 15482 } 15483 return 15484 } 15485 var req *http.Request 15486 var resp *http.Response 15487 if future.PollingURL() != "" { 15488 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 15489 if err != nil { 15490 return 15491 } 15492 } else { 15493 req = autorest.ChangeToGet(future.req) 15494 } 15495 resp, err = autorest.SendWithSender(client, req, 15496 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 15497 if err != nil { 15498 err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request") 15499 return 15500 } 15501 ar, err = client.DeleteResponder(resp) 15502 if err != nil { 15503 err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request") 15504 } 15505 return 15506} 15507 15508// SubResource reference to another subresource. 15509type SubResource struct { 15510 // ID - Resource ID. 15511 ID *string `json:"id,omitempty"` 15512} 15513 15514// TagsObject tags object for patch operations. 15515type TagsObject struct { 15516 // Tags - Resource tags. 15517 Tags map[string]*string `json:"tags"` 15518} 15519 15520// MarshalJSON is the custom marshaler for TagsObject. 15521func (toVar TagsObject) MarshalJSON() ([]byte, error) { 15522 objectMap := make(map[string]interface{}) 15523 if toVar.Tags != nil { 15524 objectMap["tags"] = toVar.Tags 15525 } 15526 return json.Marshal(objectMap) 15527} 15528 15529// Topology topology of the specified resource group. 15530type Topology struct { 15531 autorest.Response `json:"-"` 15532 // ID - GUID representing the operation id. 15533 ID *string `json:"id,omitempty"` 15534 // CreatedDateTime - The datetime when the topology was initially created for the resource group. 15535 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` 15536 // LastModified - The datetime when the topology was last modified. 15537 LastModified *date.Time `json:"lastModified,omitempty"` 15538 Resources *[]TopologyResource `json:"resources,omitempty"` 15539} 15540 15541// TopologyAssociation resources that have an association with the parent resource. 15542type TopologyAssociation struct { 15543 // Name - The name of the resource that is associated with the parent resource. 15544 Name *string `json:"name,omitempty"` 15545 // ResourceID - The ID of the resource that is associated with the parent resource. 15546 ResourceID *string `json:"resourceId,omitempty"` 15547 // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains' 15548 AssociationType AssociationType `json:"associationType,omitempty"` 15549} 15550 15551// TopologyParameters parameters that define the representation of topology. 15552type TopologyParameters struct { 15553 // TargetResourceGroupName - The name of the target resource group to perform topology on. 15554 TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` 15555 // TargetVirtualNetwork - The reference of the Virtual Network resource. 15556 TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` 15557 // TargetSubnet - The reference of the Subnet resource. 15558 TargetSubnet *SubResource `json:"targetSubnet,omitempty"` 15559} 15560 15561// TopologyResource the network resource topology information for the given resource group. 15562type TopologyResource struct { 15563 // Name - Name of the resource. 15564 Name *string `json:"name,omitempty"` 15565 // ID - ID of the resource. 15566 ID *string `json:"id,omitempty"` 15567 // Location - Resource location. 15568 Location *string `json:"location,omitempty"` 15569 // Associations - Holds the associations the resource has with other resources in the resource group. 15570 Associations *[]TopologyAssociation `json:"associations,omitempty"` 15571} 15572 15573// TroubleshootingDetails information gained from troubleshooting of specified resource. 15574type TroubleshootingDetails struct { 15575 // ID - The id of the get troubleshoot operation. 15576 ID *string `json:"id,omitempty"` 15577 // ReasonType - Reason type of failure. 15578 ReasonType *string `json:"reasonType,omitempty"` 15579 // Summary - A summary of troubleshooting. 15580 Summary *string `json:"summary,omitempty"` 15581 // Detail - Details on troubleshooting results. 15582 Detail *string `json:"detail,omitempty"` 15583 // RecommendedActions - List of recommended actions. 15584 RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` 15585} 15586 15587// TroubleshootingParameters parameters that define the resource to troubleshoot. 15588type TroubleshootingParameters struct { 15589 // TargetResourceID - The target resource to troubleshoot. 15590 TargetResourceID *string `json:"targetResourceId,omitempty"` 15591 *TroubleshootingProperties `json:"properties,omitempty"` 15592} 15593 15594// MarshalJSON is the custom marshaler for TroubleshootingParameters. 15595func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) { 15596 objectMap := make(map[string]interface{}) 15597 if tp.TargetResourceID != nil { 15598 objectMap["targetResourceId"] = tp.TargetResourceID 15599 } 15600 if tp.TroubleshootingProperties != nil { 15601 objectMap["properties"] = tp.TroubleshootingProperties 15602 } 15603 return json.Marshal(objectMap) 15604} 15605 15606// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct. 15607func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error { 15608 var m map[string]*json.RawMessage 15609 err := json.Unmarshal(body, &m) 15610 if err != nil { 15611 return err 15612 } 15613 for k, v := range m { 15614 switch k { 15615 case "targetResourceId": 15616 if v != nil { 15617 var targetResourceID string 15618 err = json.Unmarshal(*v, &targetResourceID) 15619 if err != nil { 15620 return err 15621 } 15622 tp.TargetResourceID = &targetResourceID 15623 } 15624 case "properties": 15625 if v != nil { 15626 var troubleshootingProperties TroubleshootingProperties 15627 err = json.Unmarshal(*v, &troubleshootingProperties) 15628 if err != nil { 15629 return err 15630 } 15631 tp.TroubleshootingProperties = &troubleshootingProperties 15632 } 15633 } 15634 } 15635 15636 return nil 15637} 15638 15639// TroubleshootingProperties storage location provided for troubleshoot. 15640type TroubleshootingProperties struct { 15641 // StorageID - The ID for the storage account to save the troubleshoot result. 15642 StorageID *string `json:"storageId,omitempty"` 15643 // StoragePath - The path to the blob to save the troubleshoot result in. 15644 StoragePath *string `json:"storagePath,omitempty"` 15645} 15646 15647// TroubleshootingRecommendedActions recommended actions based on discovered issues. 15648type TroubleshootingRecommendedActions struct { 15649 // ActionID - ID of the recommended action. 15650 ActionID *string `json:"actionId,omitempty"` 15651 // ActionText - Description of recommended actions. 15652 ActionText *string `json:"actionText,omitempty"` 15653 // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions. 15654 ActionURI *string `json:"actionUri,omitempty"` 15655 // ActionURIText - The information from the URI for the recommended troubleshooting actions. 15656 ActionURIText *string `json:"actionUriText,omitempty"` 15657} 15658 15659// TroubleshootingResult troubleshooting information gained from specified resource. 15660type TroubleshootingResult struct { 15661 autorest.Response `json:"-"` 15662 // StartTime - The start time of the troubleshooting. 15663 StartTime *date.Time `json:"startTime,omitempty"` 15664 // EndTime - The end time of the troubleshooting. 15665 EndTime *date.Time `json:"endTime,omitempty"` 15666 // Code - The result code of the troubleshooting. 15667 Code *string `json:"code,omitempty"` 15668 // Results - Information from troubleshooting. 15669 Results *[]TroubleshootingDetails `json:"results,omitempty"` 15670} 15671 15672// TunnelConnectionHealth virtualNetworkGatewayConnection properties 15673type TunnelConnectionHealth struct { 15674 // Tunnel - Tunnel name. 15675 Tunnel *string `json:"tunnel,omitempty"` 15676 // ConnectionStatus - Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 15677 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 15678 // IngressBytesTransferred - The Ingress Bytes Transferred in this connection 15679 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 15680 // EgressBytesTransferred - The Egress Bytes Transferred in this connection 15681 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 15682 // LastConnectionEstablishedUtcTime - The time at which connection was established in Utc format. 15683 LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` 15684} 15685 15686// Usage describes network resource usage. 15687type Usage struct { 15688 // ID - Resource identifier. 15689 ID *string `json:"id,omitempty"` 15690 // Unit - An enum describing the unit of measurement. 15691 Unit *string `json:"unit,omitempty"` 15692 // CurrentValue - The current value of the usage. 15693 CurrentValue *int64 `json:"currentValue,omitempty"` 15694 // Limit - The limit of usage. 15695 Limit *int64 `json:"limit,omitempty"` 15696 // Name - The name of the type of usage. 15697 Name *UsageName `json:"name,omitempty"` 15698} 15699 15700// UsageName the usage names. 15701type UsageName struct { 15702 // Value - A string describing the resource name. 15703 Value *string `json:"value,omitempty"` 15704 // LocalizedValue - A localized string describing the resource name. 15705 LocalizedValue *string `json:"localizedValue,omitempty"` 15706} 15707 15708// UsagesListResult the list usages operation response. 15709type UsagesListResult struct { 15710 autorest.Response `json:"-"` 15711 // Value - The list network resource usages. 15712 Value *[]Usage `json:"value,omitempty"` 15713 // NextLink - URL to get the next set of results. 15714 NextLink *string `json:"nextLink,omitempty"` 15715} 15716 15717// UsagesListResultIterator provides access to a complete listing of Usage values. 15718type UsagesListResultIterator struct { 15719 i int 15720 page UsagesListResultPage 15721} 15722 15723// Next advances to the next value. If there was an error making 15724// the request the iterator does not advance and the error is returned. 15725func (iter *UsagesListResultIterator) Next() error { 15726 iter.i++ 15727 if iter.i < len(iter.page.Values()) { 15728 return nil 15729 } 15730 err := iter.page.Next() 15731 if err != nil { 15732 iter.i-- 15733 return err 15734 } 15735 iter.i = 0 15736 return nil 15737} 15738 15739// NotDone returns true if the enumeration should be started or is not yet complete. 15740func (iter UsagesListResultIterator) NotDone() bool { 15741 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 15742} 15743 15744// Response returns the raw server response from the last page request. 15745func (iter UsagesListResultIterator) Response() UsagesListResult { 15746 return iter.page.Response() 15747} 15748 15749// Value returns the current value or a zero-initialized value if the 15750// iterator has advanced beyond the end of the collection. 15751func (iter UsagesListResultIterator) Value() Usage { 15752 if !iter.page.NotDone() { 15753 return Usage{} 15754 } 15755 return iter.page.Values()[iter.i] 15756} 15757 15758// IsEmpty returns true if the ListResult contains no values. 15759func (ulr UsagesListResult) IsEmpty() bool { 15760 return ulr.Value == nil || len(*ulr.Value) == 0 15761} 15762 15763// usagesListResultPreparer prepares a request to retrieve the next set of results. 15764// It returns nil if no more results exist. 15765func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) { 15766 if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 { 15767 return nil, nil 15768 } 15769 return autorest.Prepare(&http.Request{}, 15770 autorest.AsJSON(), 15771 autorest.AsGet(), 15772 autorest.WithBaseURL(to.String(ulr.NextLink))) 15773} 15774 15775// UsagesListResultPage contains a page of Usage values. 15776type UsagesListResultPage struct { 15777 fn func(UsagesListResult) (UsagesListResult, error) 15778 ulr UsagesListResult 15779} 15780 15781// Next advances to the next page of values. If there was an error making 15782// the request the page does not advance and the error is returned. 15783func (page *UsagesListResultPage) Next() error { 15784 next, err := page.fn(page.ulr) 15785 if err != nil { 15786 return err 15787 } 15788 page.ulr = next 15789 return nil 15790} 15791 15792// NotDone returns true if the page enumeration should be started or is not yet complete. 15793func (page UsagesListResultPage) NotDone() bool { 15794 return !page.ulr.IsEmpty() 15795} 15796 15797// Response returns the raw server response from the last page request. 15798func (page UsagesListResultPage) Response() UsagesListResult { 15799 return page.ulr 15800} 15801 15802// Values returns the slice of values for the current page or nil if there are no values. 15803func (page UsagesListResultPage) Values() []Usage { 15804 if page.ulr.IsEmpty() { 15805 return nil 15806 } 15807 return *page.ulr.Value 15808} 15809 15810// VerificationIPFlowParameters parameters that define the IP flow to be verified. 15811type VerificationIPFlowParameters struct { 15812 // TargetResourceID - The ID of the target resource to perform next-hop on. 15813 TargetResourceID *string `json:"targetResourceId,omitempty"` 15814 // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound' 15815 Direction Direction `json:"direction,omitempty"` 15816 // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP' 15817 Protocol IPFlowProtocol `json:"protocol,omitempty"` 15818 // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. 15819 LocalPort *string `json:"localPort,omitempty"` 15820 // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction. 15821 RemotePort *string `json:"remotePort,omitempty"` 15822 // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses. 15823 LocalIPAddress *string `json:"localIPAddress,omitempty"` 15824 // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses. 15825 RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` 15826 // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional). 15827 TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` 15828} 15829 15830// VerificationIPFlowResult results of IP flow verification on the target resource. 15831type VerificationIPFlowResult struct { 15832 autorest.Response `json:"-"` 15833 // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny' 15834 Access Access `json:"access,omitempty"` 15835 // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed. 15836 RuleName *string `json:"ruleName,omitempty"` 15837} 15838 15839// VirtualNetwork virtual Network resource. 15840type VirtualNetwork struct { 15841 autorest.Response `json:"-"` 15842 // VirtualNetworkPropertiesFormat - Properties of the virtual network. 15843 *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` 15844 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 15845 Etag *string `json:"etag,omitempty"` 15846 // ID - Resource ID. 15847 ID *string `json:"id,omitempty"` 15848 // Name - Resource name. 15849 Name *string `json:"name,omitempty"` 15850 // Type - Resource type. 15851 Type *string `json:"type,omitempty"` 15852 // Location - Resource location. 15853 Location *string `json:"location,omitempty"` 15854 // Tags - Resource tags. 15855 Tags map[string]*string `json:"tags"` 15856} 15857 15858// MarshalJSON is the custom marshaler for VirtualNetwork. 15859func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { 15860 objectMap := make(map[string]interface{}) 15861 if vn.VirtualNetworkPropertiesFormat != nil { 15862 objectMap["properties"] = vn.VirtualNetworkPropertiesFormat 15863 } 15864 if vn.Etag != nil { 15865 objectMap["etag"] = vn.Etag 15866 } 15867 if vn.ID != nil { 15868 objectMap["id"] = vn.ID 15869 } 15870 if vn.Name != nil { 15871 objectMap["name"] = vn.Name 15872 } 15873 if vn.Type != nil { 15874 objectMap["type"] = vn.Type 15875 } 15876 if vn.Location != nil { 15877 objectMap["location"] = vn.Location 15878 } 15879 if vn.Tags != nil { 15880 objectMap["tags"] = vn.Tags 15881 } 15882 return json.Marshal(objectMap) 15883} 15884 15885// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct. 15886func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { 15887 var m map[string]*json.RawMessage 15888 err := json.Unmarshal(body, &m) 15889 if err != nil { 15890 return err 15891 } 15892 for k, v := range m { 15893 switch k { 15894 case "properties": 15895 if v != nil { 15896 var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat 15897 err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat) 15898 if err != nil { 15899 return err 15900 } 15901 vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat 15902 } 15903 case "etag": 15904 if v != nil { 15905 var etag string 15906 err = json.Unmarshal(*v, &etag) 15907 if err != nil { 15908 return err 15909 } 15910 vn.Etag = &etag 15911 } 15912 case "id": 15913 if v != nil { 15914 var ID string 15915 err = json.Unmarshal(*v, &ID) 15916 if err != nil { 15917 return err 15918 } 15919 vn.ID = &ID 15920 } 15921 case "name": 15922 if v != nil { 15923 var name string 15924 err = json.Unmarshal(*v, &name) 15925 if err != nil { 15926 return err 15927 } 15928 vn.Name = &name 15929 } 15930 case "type": 15931 if v != nil { 15932 var typeVar string 15933 err = json.Unmarshal(*v, &typeVar) 15934 if err != nil { 15935 return err 15936 } 15937 vn.Type = &typeVar 15938 } 15939 case "location": 15940 if v != nil { 15941 var location string 15942 err = json.Unmarshal(*v, &location) 15943 if err != nil { 15944 return err 15945 } 15946 vn.Location = &location 15947 } 15948 case "tags": 15949 if v != nil { 15950 var tags map[string]*string 15951 err = json.Unmarshal(*v, &tags) 15952 if err != nil { 15953 return err 15954 } 15955 vn.Tags = tags 15956 } 15957 } 15958 } 15959 15960 return nil 15961} 15962 15963// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway resource. 15964type VirtualNetworkConnectionGatewayReference struct { 15965 // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource. 15966 ID *string `json:"id,omitempty"` 15967} 15968 15969// VirtualNetworkGateway a common class for general resource information 15970type VirtualNetworkGateway struct { 15971 autorest.Response `json:"-"` 15972 // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. 15973 *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` 15974 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 15975 Etag *string `json:"etag,omitempty"` 15976 // ID - Resource ID. 15977 ID *string `json:"id,omitempty"` 15978 // Name - Resource name. 15979 Name *string `json:"name,omitempty"` 15980 // Type - Resource type. 15981 Type *string `json:"type,omitempty"` 15982 // Location - Resource location. 15983 Location *string `json:"location,omitempty"` 15984 // Tags - Resource tags. 15985 Tags map[string]*string `json:"tags"` 15986} 15987 15988// MarshalJSON is the custom marshaler for VirtualNetworkGateway. 15989func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { 15990 objectMap := make(map[string]interface{}) 15991 if vng.VirtualNetworkGatewayPropertiesFormat != nil { 15992 objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat 15993 } 15994 if vng.Etag != nil { 15995 objectMap["etag"] = vng.Etag 15996 } 15997 if vng.ID != nil { 15998 objectMap["id"] = vng.ID 15999 } 16000 if vng.Name != nil { 16001 objectMap["name"] = vng.Name 16002 } 16003 if vng.Type != nil { 16004 objectMap["type"] = vng.Type 16005 } 16006 if vng.Location != nil { 16007 objectMap["location"] = vng.Location 16008 } 16009 if vng.Tags != nil { 16010 objectMap["tags"] = vng.Tags 16011 } 16012 return json.Marshal(objectMap) 16013} 16014 16015// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct. 16016func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { 16017 var m map[string]*json.RawMessage 16018 err := json.Unmarshal(body, &m) 16019 if err != nil { 16020 return err 16021 } 16022 for k, v := range m { 16023 switch k { 16024 case "properties": 16025 if v != nil { 16026 var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat 16027 err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) 16028 if err != nil { 16029 return err 16030 } 16031 vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat 16032 } 16033 case "etag": 16034 if v != nil { 16035 var etag string 16036 err = json.Unmarshal(*v, &etag) 16037 if err != nil { 16038 return err 16039 } 16040 vng.Etag = &etag 16041 } 16042 case "id": 16043 if v != nil { 16044 var ID string 16045 err = json.Unmarshal(*v, &ID) 16046 if err != nil { 16047 return err 16048 } 16049 vng.ID = &ID 16050 } 16051 case "name": 16052 if v != nil { 16053 var name string 16054 err = json.Unmarshal(*v, &name) 16055 if err != nil { 16056 return err 16057 } 16058 vng.Name = &name 16059 } 16060 case "type": 16061 if v != nil { 16062 var typeVar string 16063 err = json.Unmarshal(*v, &typeVar) 16064 if err != nil { 16065 return err 16066 } 16067 vng.Type = &typeVar 16068 } 16069 case "location": 16070 if v != nil { 16071 var location string 16072 err = json.Unmarshal(*v, &location) 16073 if err != nil { 16074 return err 16075 } 16076 vng.Location = &location 16077 } 16078 case "tags": 16079 if v != nil { 16080 var tags map[string]*string 16081 err = json.Unmarshal(*v, &tags) 16082 if err != nil { 16083 return err 16084 } 16085 vng.Tags = tags 16086 } 16087 } 16088 } 16089 16090 return nil 16091} 16092 16093// VirtualNetworkGatewayConnection a common class for general resource information 16094type VirtualNetworkGatewayConnection struct { 16095 autorest.Response `json:"-"` 16096 // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. 16097 *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` 16098 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 16099 Etag *string `json:"etag,omitempty"` 16100 // ID - Resource ID. 16101 ID *string `json:"id,omitempty"` 16102 // Name - Resource name. 16103 Name *string `json:"name,omitempty"` 16104 // Type - Resource type. 16105 Type *string `json:"type,omitempty"` 16106 // Location - Resource location. 16107 Location *string `json:"location,omitempty"` 16108 // Tags - Resource tags. 16109 Tags map[string]*string `json:"tags"` 16110} 16111 16112// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection. 16113func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { 16114 objectMap := make(map[string]interface{}) 16115 if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { 16116 objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat 16117 } 16118 if vngc.Etag != nil { 16119 objectMap["etag"] = vngc.Etag 16120 } 16121 if vngc.ID != nil { 16122 objectMap["id"] = vngc.ID 16123 } 16124 if vngc.Name != nil { 16125 objectMap["name"] = vngc.Name 16126 } 16127 if vngc.Type != nil { 16128 objectMap["type"] = vngc.Type 16129 } 16130 if vngc.Location != nil { 16131 objectMap["location"] = vngc.Location 16132 } 16133 if vngc.Tags != nil { 16134 objectMap["tags"] = vngc.Tags 16135 } 16136 return json.Marshal(objectMap) 16137} 16138 16139// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct. 16140func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { 16141 var m map[string]*json.RawMessage 16142 err := json.Unmarshal(body, &m) 16143 if err != nil { 16144 return err 16145 } 16146 for k, v := range m { 16147 switch k { 16148 case "properties": 16149 if v != nil { 16150 var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat 16151 err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat) 16152 if err != nil { 16153 return err 16154 } 16155 vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat 16156 } 16157 case "etag": 16158 if v != nil { 16159 var etag string 16160 err = json.Unmarshal(*v, &etag) 16161 if err != nil { 16162 return err 16163 } 16164 vngc.Etag = &etag 16165 } 16166 case "id": 16167 if v != nil { 16168 var ID string 16169 err = json.Unmarshal(*v, &ID) 16170 if err != nil { 16171 return err 16172 } 16173 vngc.ID = &ID 16174 } 16175 case "name": 16176 if v != nil { 16177 var name string 16178 err = json.Unmarshal(*v, &name) 16179 if err != nil { 16180 return err 16181 } 16182 vngc.Name = &name 16183 } 16184 case "type": 16185 if v != nil { 16186 var typeVar string 16187 err = json.Unmarshal(*v, &typeVar) 16188 if err != nil { 16189 return err 16190 } 16191 vngc.Type = &typeVar 16192 } 16193 case "location": 16194 if v != nil { 16195 var location string 16196 err = json.Unmarshal(*v, &location) 16197 if err != nil { 16198 return err 16199 } 16200 vngc.Location = &location 16201 } 16202 case "tags": 16203 if v != nil { 16204 var tags map[string]*string 16205 err = json.Unmarshal(*v, &tags) 16206 if err != nil { 16207 return err 16208 } 16209 vngc.Tags = tags 16210 } 16211 } 16212 } 16213 16214 return nil 16215} 16216 16217// VirtualNetworkGatewayConnectionListEntity a common class for general resource information 16218type VirtualNetworkGatewayConnectionListEntity struct { 16219 autorest.Response `json:"-"` 16220 // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. 16221 *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` 16222 // Etag - Gets a unique read-only string that changes whenever the resource is updated. 16223 Etag *string `json:"etag,omitempty"` 16224 // ID - Resource ID. 16225 ID *string `json:"id,omitempty"` 16226 // Name - Resource name. 16227 Name *string `json:"name,omitempty"` 16228 // Type - Resource type. 16229 Type *string `json:"type,omitempty"` 16230 // Location - Resource location. 16231 Location *string `json:"location,omitempty"` 16232 // Tags - Resource tags. 16233 Tags map[string]*string `json:"tags"` 16234} 16235 16236// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity. 16237func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { 16238 objectMap := make(map[string]interface{}) 16239 if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { 16240 objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat 16241 } 16242 if vngcle.Etag != nil { 16243 objectMap["etag"] = vngcle.Etag 16244 } 16245 if vngcle.ID != nil { 16246 objectMap["id"] = vngcle.ID 16247 } 16248 if vngcle.Name != nil { 16249 objectMap["name"] = vngcle.Name 16250 } 16251 if vngcle.Type != nil { 16252 objectMap["type"] = vngcle.Type 16253 } 16254 if vngcle.Location != nil { 16255 objectMap["location"] = vngcle.Location 16256 } 16257 if vngcle.Tags != nil { 16258 objectMap["tags"] = vngcle.Tags 16259 } 16260 return json.Marshal(objectMap) 16261} 16262 16263// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct. 16264func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error { 16265 var m map[string]*json.RawMessage 16266 err := json.Unmarshal(body, &m) 16267 if err != nil { 16268 return err 16269 } 16270 for k, v := range m { 16271 switch k { 16272 case "properties": 16273 if v != nil { 16274 var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat 16275 err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat) 16276 if err != nil { 16277 return err 16278 } 16279 vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat 16280 } 16281 case "etag": 16282 if v != nil { 16283 var etag string 16284 err = json.Unmarshal(*v, &etag) 16285 if err != nil { 16286 return err 16287 } 16288 vngcle.Etag = &etag 16289 } 16290 case "id": 16291 if v != nil { 16292 var ID string 16293 err = json.Unmarshal(*v, &ID) 16294 if err != nil { 16295 return err 16296 } 16297 vngcle.ID = &ID 16298 } 16299 case "name": 16300 if v != nil { 16301 var name string 16302 err = json.Unmarshal(*v, &name) 16303 if err != nil { 16304 return err 16305 } 16306 vngcle.Name = &name 16307 } 16308 case "type": 16309 if v != nil { 16310 var typeVar string 16311 err = json.Unmarshal(*v, &typeVar) 16312 if err != nil { 16313 return err 16314 } 16315 vngcle.Type = &typeVar 16316 } 16317 case "location": 16318 if v != nil { 16319 var location string 16320 err = json.Unmarshal(*v, &location) 16321 if err != nil { 16322 return err 16323 } 16324 vngcle.Location = &location 16325 } 16326 case "tags": 16327 if v != nil { 16328 var tags map[string]*string 16329 err = json.Unmarshal(*v, &tags) 16330 if err != nil { 16331 return err 16332 } 16333 vngcle.Tags = tags 16334 } 16335 } 16336 } 16337 16338 return nil 16339} 16340 16341// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties 16342type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { 16343 // AuthorizationKey - The authorizationKey. 16344 AuthorizationKey *string `json:"authorizationKey,omitempty"` 16345 // VirtualNetworkGateway1 - The reference to virtual network gateway resource. 16346 VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` 16347 // VirtualNetworkGateway2 - The reference to virtual network gateway resource. 16348 VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` 16349 // LocalNetworkGateway2 - The reference to local network gateway resource. 16350 LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` 16351 // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' 16352 ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` 16353 // RoutingWeight - The routing weight. 16354 RoutingWeight *int32 `json:"routingWeight,omitempty"` 16355 // SharedKey - The IPSec shared key. 16356 SharedKey *string `json:"sharedKey,omitempty"` 16357 // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 16358 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 16359 // TunnelConnectionStatus - Collection of all tunnels' connection health status. 16360 TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` 16361 // EgressBytesTransferred - The egress bytes transferred in this connection. 16362 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 16363 // IngressBytesTransferred - The ingress bytes transferred in this connection. 16364 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 16365 // Peer - The reference to peerings resource. 16366 Peer *SubResource `json:"peer,omitempty"` 16367 // EnableBgp - EnableBgp flag 16368 EnableBgp *bool `json:"enableBgp,omitempty"` 16369 // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. 16370 UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` 16371 // IpsecPolicies - The IPSec Policies to be considered by this connection. 16372 IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` 16373 // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. 16374 ResourceGUID *string `json:"resourceGuid,omitempty"` 16375 // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16376 ProvisioningState *string `json:"provisioningState,omitempty"` 16377} 16378 16379// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call 16380type VirtualNetworkGatewayConnectionListResult struct { 16381 autorest.Response `json:"-"` 16382 // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. 16383 Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` 16384 // NextLink - The URL to get the next set of results. 16385 NextLink *string `json:"nextLink,omitempty"` 16386} 16387 16388// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of 16389// VirtualNetworkGatewayConnection values. 16390type VirtualNetworkGatewayConnectionListResultIterator struct { 16391 i int 16392 page VirtualNetworkGatewayConnectionListResultPage 16393} 16394 16395// Next advances to the next value. If there was an error making 16396// the request the iterator does not advance and the error is returned. 16397func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error { 16398 iter.i++ 16399 if iter.i < len(iter.page.Values()) { 16400 return nil 16401 } 16402 err := iter.page.Next() 16403 if err != nil { 16404 iter.i-- 16405 return err 16406 } 16407 iter.i = 0 16408 return nil 16409} 16410 16411// NotDone returns true if the enumeration should be started or is not yet complete. 16412func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool { 16413 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16414} 16415 16416// Response returns the raw server response from the last page request. 16417func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult { 16418 return iter.page.Response() 16419} 16420 16421// Value returns the current value or a zero-initialized value if the 16422// iterator has advanced beyond the end of the collection. 16423func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection { 16424 if !iter.page.NotDone() { 16425 return VirtualNetworkGatewayConnection{} 16426 } 16427 return iter.page.Values()[iter.i] 16428} 16429 16430// IsEmpty returns true if the ListResult contains no values. 16431func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool { 16432 return vngclr.Value == nil || len(*vngclr.Value) == 0 16433} 16434 16435// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results. 16436// It returns nil if no more results exist. 16437func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) { 16438 if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 { 16439 return nil, nil 16440 } 16441 return autorest.Prepare(&http.Request{}, 16442 autorest.AsJSON(), 16443 autorest.AsGet(), 16444 autorest.WithBaseURL(to.String(vngclr.NextLink))) 16445} 16446 16447// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values. 16448type VirtualNetworkGatewayConnectionListResultPage struct { 16449 fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error) 16450 vngclr VirtualNetworkGatewayConnectionListResult 16451} 16452 16453// Next advances to the next page of values. If there was an error making 16454// the request the page does not advance and the error is returned. 16455func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error { 16456 next, err := page.fn(page.vngclr) 16457 if err != nil { 16458 return err 16459 } 16460 page.vngclr = next 16461 return nil 16462} 16463 16464// NotDone returns true if the page enumeration should be started or is not yet complete. 16465func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool { 16466 return !page.vngclr.IsEmpty() 16467} 16468 16469// Response returns the raw server response from the last page request. 16470func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult { 16471 return page.vngclr 16472} 16473 16474// Values returns the slice of values for the current page or nil if there are no values. 16475func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection { 16476 if page.vngclr.IsEmpty() { 16477 return nil 16478 } 16479 return *page.vngclr.Value 16480} 16481 16482// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties 16483type VirtualNetworkGatewayConnectionPropertiesFormat struct { 16484 // AuthorizationKey - The authorizationKey. 16485 AuthorizationKey *string `json:"authorizationKey,omitempty"` 16486 // VirtualNetworkGateway1 - The reference to virtual network gateway resource. 16487 VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` 16488 // VirtualNetworkGateway2 - The reference to virtual network gateway resource. 16489 VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` 16490 // LocalNetworkGateway2 - The reference to local network gateway resource. 16491 LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` 16492 // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' 16493 ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` 16494 // RoutingWeight - The routing weight. 16495 RoutingWeight *int32 `json:"routingWeight,omitempty"` 16496 // SharedKey - The IPSec shared key. 16497 SharedKey *string `json:"sharedKey,omitempty"` 16498 // ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' 16499 ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` 16500 // TunnelConnectionStatus - Collection of all tunnels' connection health status. 16501 TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` 16502 // EgressBytesTransferred - The egress bytes transferred in this connection. 16503 EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` 16504 // IngressBytesTransferred - The ingress bytes transferred in this connection. 16505 IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` 16506 // Peer - The reference to peerings resource. 16507 Peer *SubResource `json:"peer,omitempty"` 16508 // EnableBgp - EnableBgp flag 16509 EnableBgp *bool `json:"enableBgp,omitempty"` 16510 // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. 16511 UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` 16512 // IpsecPolicies - The IPSec Policies to be considered by this connection. 16513 IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` 16514 // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource. 16515 ResourceGUID *string `json:"resourceGuid,omitempty"` 16516 // ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16517 ProvisioningState *string `json:"provisioningState,omitempty"` 16518} 16519 16520// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of 16521// a long-running operation. 16522type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct { 16523 azure.Future 16524 req *http.Request 16525} 16526 16527// Result returns the result of the asynchronous operation. 16528// If the operation has not completed it will return an error. 16529func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) { 16530 var done bool 16531 done, err = future.Done(client) 16532 if err != nil { 16533 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 16534 return 16535 } 16536 if !done { 16537 return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture") 16538 } 16539 if future.PollingMethod() == azure.PollingLocation { 16540 vngc, err = client.CreateOrUpdateResponder(future.Response()) 16541 if err != nil { 16542 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 16543 } 16544 return 16545 } 16546 var req *http.Request 16547 var resp *http.Response 16548 if future.PollingURL() != "" { 16549 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 16550 if err != nil { 16551 return 16552 } 16553 } else { 16554 req = autorest.ChangeToGet(future.req) 16555 } 16556 resp, err = autorest.SendWithSender(client, req, 16557 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16558 if err != nil { 16559 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 16560 return 16561 } 16562 vngc, err = client.CreateOrUpdateResponder(resp) 16563 if err != nil { 16564 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 16565 } 16566 return 16567} 16568 16569// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a 16570// long-running operation. 16571type VirtualNetworkGatewayConnectionsDeleteFuture struct { 16572 azure.Future 16573 req *http.Request 16574} 16575 16576// Result returns the result of the asynchronous operation. 16577// If the operation has not completed it will return an error. 16578func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) { 16579 var done bool 16580 done, err = future.Done(client) 16581 if err != nil { 16582 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") 16583 return 16584 } 16585 if !done { 16586 return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture") 16587 } 16588 if future.PollingMethod() == azure.PollingLocation { 16589 ar, err = client.DeleteResponder(future.Response()) 16590 if err != nil { 16591 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request") 16592 } 16593 return 16594 } 16595 var req *http.Request 16596 var resp *http.Response 16597 if future.PollingURL() != "" { 16598 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 16599 if err != nil { 16600 return 16601 } 16602 } else { 16603 req = autorest.ChangeToGet(future.req) 16604 } 16605 resp, err = autorest.SendWithSender(client, req, 16606 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16607 if err != nil { 16608 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request") 16609 return 16610 } 16611 ar, err = client.DeleteResponder(resp) 16612 if err != nil { 16613 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request") 16614 } 16615 return 16616} 16617 16618// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of 16619// a long-running operation. 16620type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct { 16621 azure.Future 16622 req *http.Request 16623} 16624 16625// Result returns the result of the asynchronous operation. 16626// If the operation has not completed it will return an error. 16627func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) { 16628 var done bool 16629 done, err = future.Done(client) 16630 if err != nil { 16631 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure") 16632 return 16633 } 16634 if !done { 16635 return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture") 16636 } 16637 if future.PollingMethod() == azure.PollingLocation { 16638 crsk, err = client.ResetSharedKeyResponder(future.Response()) 16639 if err != nil { 16640 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request") 16641 } 16642 return 16643 } 16644 var req *http.Request 16645 var resp *http.Response 16646 if future.PollingURL() != "" { 16647 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 16648 if err != nil { 16649 return 16650 } 16651 } else { 16652 req = autorest.ChangeToGet(future.req) 16653 } 16654 resp, err = autorest.SendWithSender(client, req, 16655 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16656 if err != nil { 16657 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request") 16658 return 16659 } 16660 crsk, err = client.ResetSharedKeyResponder(resp) 16661 if err != nil { 16662 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request") 16663 } 16664 return 16665} 16666 16667// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a 16668// long-running operation. 16669type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct { 16670 azure.Future 16671 req *http.Request 16672} 16673 16674// Result returns the result of the asynchronous operation. 16675// If the operation has not completed it will return an error. 16676func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) { 16677 var done bool 16678 done, err = future.Done(client) 16679 if err != nil { 16680 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure") 16681 return 16682 } 16683 if !done { 16684 return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture") 16685 } 16686 if future.PollingMethod() == azure.PollingLocation { 16687 csk, err = client.SetSharedKeyResponder(future.Response()) 16688 if err != nil { 16689 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request") 16690 } 16691 return 16692 } 16693 var req *http.Request 16694 var resp *http.Response 16695 if future.PollingURL() != "" { 16696 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 16697 if err != nil { 16698 return 16699 } 16700 } else { 16701 req = autorest.ChangeToGet(future.req) 16702 } 16703 resp, err = autorest.SendWithSender(client, req, 16704 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16705 if err != nil { 16706 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request") 16707 return 16708 } 16709 csk, err = client.SetSharedKeyResponder(resp) 16710 if err != nil { 16711 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request") 16712 } 16713 return 16714} 16715 16716// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 16717// long-running operation. 16718type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct { 16719 azure.Future 16720 req *http.Request 16721} 16722 16723// Result returns the result of the asynchronous operation. 16724// If the operation has not completed it will return an error. 16725func (future VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) { 16726 var done bool 16727 done, err = future.Done(client) 16728 if err != nil { 16729 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") 16730 return 16731 } 16732 if !done { 16733 return vngcle, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture") 16734 } 16735 if future.PollingMethod() == azure.PollingLocation { 16736 vngcle, err = client.UpdateTagsResponder(future.Response()) 16737 if err != nil { 16738 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 16739 } 16740 return 16741 } 16742 var req *http.Request 16743 var resp *http.Response 16744 if future.PollingURL() != "" { 16745 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 16746 if err != nil { 16747 return 16748 } 16749 } else { 16750 req = autorest.ChangeToGet(future.req) 16751 } 16752 resp, err = autorest.SendWithSender(client, req, 16753 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 16754 if err != nil { 16755 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure sending request") 16756 return 16757 } 16758 vngcle, err = client.UpdateTagsResponder(resp) 16759 if err != nil { 16760 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", resp, "Failure responding to request") 16761 } 16762 return 16763} 16764 16765// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway 16766type VirtualNetworkGatewayIPConfiguration struct { 16767 // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. 16768 *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` 16769 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 16770 Name *string `json:"name,omitempty"` 16771 // Etag - A unique read-only string that changes whenever the resource is updated. 16772 Etag *string `json:"etag,omitempty"` 16773 // ID - Resource ID. 16774 ID *string `json:"id,omitempty"` 16775} 16776 16777// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration. 16778func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { 16779 objectMap := make(map[string]interface{}) 16780 if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil { 16781 objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat 16782 } 16783 if vngic.Name != nil { 16784 objectMap["name"] = vngic.Name 16785 } 16786 if vngic.Etag != nil { 16787 objectMap["etag"] = vngic.Etag 16788 } 16789 if vngic.ID != nil { 16790 objectMap["id"] = vngic.ID 16791 } 16792 return json.Marshal(objectMap) 16793} 16794 16795// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct. 16796func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error { 16797 var m map[string]*json.RawMessage 16798 err := json.Unmarshal(body, &m) 16799 if err != nil { 16800 return err 16801 } 16802 for k, v := range m { 16803 switch k { 16804 case "properties": 16805 if v != nil { 16806 var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat 16807 err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat) 16808 if err != nil { 16809 return err 16810 } 16811 vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat 16812 } 16813 case "name": 16814 if v != nil { 16815 var name string 16816 err = json.Unmarshal(*v, &name) 16817 if err != nil { 16818 return err 16819 } 16820 vngic.Name = &name 16821 } 16822 case "etag": 16823 if v != nil { 16824 var etag string 16825 err = json.Unmarshal(*v, &etag) 16826 if err != nil { 16827 return err 16828 } 16829 vngic.Etag = &etag 16830 } 16831 case "id": 16832 if v != nil { 16833 var ID string 16834 err = json.Unmarshal(*v, &ID) 16835 if err != nil { 16836 return err 16837 } 16838 vngic.ID = &ID 16839 } 16840 } 16841 } 16842 16843 return nil 16844} 16845 16846// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration 16847type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { 16848 // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' 16849 PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` 16850 // Subnet - The reference of the subnet resource. 16851 Subnet *SubResource `json:"subnet,omitempty"` 16852 // PublicIPAddress - The reference of the public IP resource. 16853 PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` 16854 // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 16855 ProvisioningState *string `json:"provisioningState,omitempty"` 16856} 16857 16858// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service 16859// call 16860type VirtualNetworkGatewayListConnectionsResult struct { 16861 autorest.Response `json:"-"` 16862 // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. 16863 Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` 16864 // NextLink - The URL to get the next set of results. 16865 NextLink *string `json:"nextLink,omitempty"` 16866} 16867 16868// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of 16869// VirtualNetworkGatewayConnectionListEntity values. 16870type VirtualNetworkGatewayListConnectionsResultIterator struct { 16871 i int 16872 page VirtualNetworkGatewayListConnectionsResultPage 16873} 16874 16875// Next advances to the next value. If there was an error making 16876// the request the iterator does not advance and the error is returned. 16877func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error { 16878 iter.i++ 16879 if iter.i < len(iter.page.Values()) { 16880 return nil 16881 } 16882 err := iter.page.Next() 16883 if err != nil { 16884 iter.i-- 16885 return err 16886 } 16887 iter.i = 0 16888 return nil 16889} 16890 16891// NotDone returns true if the enumeration should be started or is not yet complete. 16892func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool { 16893 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16894} 16895 16896// Response returns the raw server response from the last page request. 16897func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult { 16898 return iter.page.Response() 16899} 16900 16901// Value returns the current value or a zero-initialized value if the 16902// iterator has advanced beyond the end of the collection. 16903func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity { 16904 if !iter.page.NotDone() { 16905 return VirtualNetworkGatewayConnectionListEntity{} 16906 } 16907 return iter.page.Values()[iter.i] 16908} 16909 16910// IsEmpty returns true if the ListResult contains no values. 16911func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool { 16912 return vnglcr.Value == nil || len(*vnglcr.Value) == 0 16913} 16914 16915// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. 16916// It returns nil if no more results exist. 16917func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) { 16918 if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 { 16919 return nil, nil 16920 } 16921 return autorest.Prepare(&http.Request{}, 16922 autorest.AsJSON(), 16923 autorest.AsGet(), 16924 autorest.WithBaseURL(to.String(vnglcr.NextLink))) 16925} 16926 16927// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity 16928// values. 16929type VirtualNetworkGatewayListConnectionsResultPage struct { 16930 fn func(VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error) 16931 vnglcr VirtualNetworkGatewayListConnectionsResult 16932} 16933 16934// Next advances to the next page of values. If there was an error making 16935// the request the page does not advance and the error is returned. 16936func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error { 16937 next, err := page.fn(page.vnglcr) 16938 if err != nil { 16939 return err 16940 } 16941 page.vnglcr = next 16942 return nil 16943} 16944 16945// NotDone returns true if the page enumeration should be started or is not yet complete. 16946func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool { 16947 return !page.vnglcr.IsEmpty() 16948} 16949 16950// Response returns the raw server response from the last page request. 16951func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult { 16952 return page.vnglcr 16953} 16954 16955// Values returns the slice of values for the current page or nil if there are no values. 16956func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity { 16957 if page.vnglcr.IsEmpty() { 16958 return nil 16959 } 16960 return *page.vnglcr.Value 16961} 16962 16963// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call. 16964type VirtualNetworkGatewayListResult struct { 16965 autorest.Response `json:"-"` 16966 // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group. 16967 Value *[]VirtualNetworkGateway `json:"value,omitempty"` 16968 // NextLink - The URL to get the next set of results. 16969 NextLink *string `json:"nextLink,omitempty"` 16970} 16971 16972// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values. 16973type VirtualNetworkGatewayListResultIterator struct { 16974 i int 16975 page VirtualNetworkGatewayListResultPage 16976} 16977 16978// Next advances to the next value. If there was an error making 16979// the request the iterator does not advance and the error is returned. 16980func (iter *VirtualNetworkGatewayListResultIterator) Next() error { 16981 iter.i++ 16982 if iter.i < len(iter.page.Values()) { 16983 return nil 16984 } 16985 err := iter.page.Next() 16986 if err != nil { 16987 iter.i-- 16988 return err 16989 } 16990 iter.i = 0 16991 return nil 16992} 16993 16994// NotDone returns true if the enumeration should be started or is not yet complete. 16995func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool { 16996 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 16997} 16998 16999// Response returns the raw server response from the last page request. 17000func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult { 17001 return iter.page.Response() 17002} 17003 17004// Value returns the current value or a zero-initialized value if the 17005// iterator has advanced beyond the end of the collection. 17006func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway { 17007 if !iter.page.NotDone() { 17008 return VirtualNetworkGateway{} 17009 } 17010 return iter.page.Values()[iter.i] 17011} 17012 17013// IsEmpty returns true if the ListResult contains no values. 17014func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool { 17015 return vnglr.Value == nil || len(*vnglr.Value) == 0 17016} 17017 17018// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. 17019// It returns nil if no more results exist. 17020func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) { 17021 if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 { 17022 return nil, nil 17023 } 17024 return autorest.Prepare(&http.Request{}, 17025 autorest.AsJSON(), 17026 autorest.AsGet(), 17027 autorest.WithBaseURL(to.String(vnglr.NextLink))) 17028} 17029 17030// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values. 17031type VirtualNetworkGatewayListResultPage struct { 17032 fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error) 17033 vnglr VirtualNetworkGatewayListResult 17034} 17035 17036// Next advances to the next page of values. If there was an error making 17037// the request the page does not advance and the error is returned. 17038func (page *VirtualNetworkGatewayListResultPage) Next() error { 17039 next, err := page.fn(page.vnglr) 17040 if err != nil { 17041 return err 17042 } 17043 page.vnglr = next 17044 return nil 17045} 17046 17047// NotDone returns true if the page enumeration should be started or is not yet complete. 17048func (page VirtualNetworkGatewayListResultPage) NotDone() bool { 17049 return !page.vnglr.IsEmpty() 17050} 17051 17052// Response returns the raw server response from the last page request. 17053func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult { 17054 return page.vnglr 17055} 17056 17057// Values returns the slice of values for the current page or nil if there are no values. 17058func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway { 17059 if page.vnglr.IsEmpty() { 17060 return nil 17061 } 17062 return *page.vnglr.Value 17063} 17064 17065// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties 17066type VirtualNetworkGatewayPropertiesFormat struct { 17067 // IPConfigurations - IP configurations for virtual network gateway. 17068 IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` 17069 // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' 17070 GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` 17071 // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased' 17072 VpnType VpnType `json:"vpnType,omitempty"` 17073 // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. 17074 EnableBgp *bool `json:"enableBgp,omitempty"` 17075 // ActiveActive - ActiveActive flag 17076 ActiveActive *bool `json:"activeActive,omitempty"` 17077 // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. 17078 GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` 17079 // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. 17080 Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` 17081 // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations. 17082 VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` 17083 // BgpSettings - Virtual network gateway's BGP speaker settings. 17084 BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` 17085 // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. 17086 ResourceGUID *string `json:"resourceGuid,omitempty"` 17087 // ProvisioningState - The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 17088 ProvisioningState *string `json:"provisioningState,omitempty"` 17089} 17090 17091// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 17092// long-running operation. 17093type VirtualNetworkGatewaysCreateOrUpdateFuture struct { 17094 azure.Future 17095 req *http.Request 17096} 17097 17098// Result returns the result of the asynchronous operation. 17099// If the operation has not completed it will return an error. 17100func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 17101 var done bool 17102 done, err = future.Done(client) 17103 if err != nil { 17104 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 17105 return 17106 } 17107 if !done { 17108 return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture") 17109 } 17110 if future.PollingMethod() == azure.PollingLocation { 17111 vng, err = client.CreateOrUpdateResponder(future.Response()) 17112 if err != nil { 17113 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 17114 } 17115 return 17116 } 17117 var req *http.Request 17118 var resp *http.Response 17119 if future.PollingURL() != "" { 17120 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17121 if err != nil { 17122 return 17123 } 17124 } else { 17125 req = autorest.ChangeToGet(future.req) 17126 } 17127 resp, err = autorest.SendWithSender(client, req, 17128 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17129 if err != nil { 17130 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request") 17131 return 17132 } 17133 vng, err = client.CreateOrUpdateResponder(resp) 17134 if err != nil { 17135 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 17136 } 17137 return 17138} 17139 17140// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 17141// operation. 17142type VirtualNetworkGatewaysDeleteFuture struct { 17143 azure.Future 17144 req *http.Request 17145} 17146 17147// Result returns the result of the asynchronous operation. 17148// If the operation has not completed it will return an error. 17149func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) { 17150 var done bool 17151 done, err = future.Done(client) 17152 if err != nil { 17153 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") 17154 return 17155 } 17156 if !done { 17157 return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture") 17158 } 17159 if future.PollingMethod() == azure.PollingLocation { 17160 ar, err = client.DeleteResponder(future.Response()) 17161 if err != nil { 17162 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request") 17163 } 17164 return 17165 } 17166 var req *http.Request 17167 var resp *http.Response 17168 if future.PollingURL() != "" { 17169 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17170 if err != nil { 17171 return 17172 } 17173 } else { 17174 req = autorest.ChangeToGet(future.req) 17175 } 17176 resp, err = autorest.SendWithSender(client, req, 17177 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17178 if err != nil { 17179 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request") 17180 return 17181 } 17182 ar, err = client.DeleteResponder(resp) 17183 if err != nil { 17184 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request") 17185 } 17186 return 17187} 17188 17189// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the results of 17190// a long-running operation. 17191type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct { 17192 azure.Future 17193 req *http.Request 17194} 17195 17196// Result returns the result of the asynchronous operation. 17197// If the operation has not completed it will return an error. 17198func (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 17199 var done bool 17200 done, err = future.Done(client) 17201 if err != nil { 17202 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure") 17203 return 17204 } 17205 if !done { 17206 return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture") 17207 } 17208 if future.PollingMethod() == azure.PollingLocation { 17209 s, err = client.GeneratevpnclientpackageResponder(future.Response()) 17210 if err != nil { 17211 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Failure responding to request") 17212 } 17213 return 17214 } 17215 var req *http.Request 17216 var resp *http.Response 17217 if future.PollingURL() != "" { 17218 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17219 if err != nil { 17220 return 17221 } 17222 } else { 17223 req = autorest.ChangeToGet(future.req) 17224 } 17225 resp, err = autorest.SendWithSender(client, req, 17226 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17227 if err != nil { 17228 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure sending request") 17229 return 17230 } 17231 s, err = client.GeneratevpnclientpackageResponder(resp) 17232 if err != nil { 17233 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", resp, "Failure responding to request") 17234 } 17235 return 17236} 17237 17238// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a 17239// long-running operation. 17240type VirtualNetworkGatewaysGenerateVpnProfileFuture struct { 17241 azure.Future 17242 req *http.Request 17243} 17244 17245// Result returns the result of the asynchronous operation. 17246// If the operation has not completed it will return an error. 17247func (future VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 17248 var done bool 17249 done, err = future.Done(client) 17250 if err != nil { 17251 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") 17252 return 17253 } 17254 if !done { 17255 return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture") 17256 } 17257 if future.PollingMethod() == azure.PollingLocation { 17258 s, err = client.GenerateVpnProfileResponder(future.Response()) 17259 if err != nil { 17260 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Failure responding to request") 17261 } 17262 return 17263 } 17264 var req *http.Request 17265 var resp *http.Response 17266 if future.PollingURL() != "" { 17267 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17268 if err != nil { 17269 return 17270 } 17271 } else { 17272 req = autorest.ChangeToGet(future.req) 17273 } 17274 resp, err = autorest.SendWithSender(client, req, 17275 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17276 if err != nil { 17277 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure sending request") 17278 return 17279 } 17280 s, err = client.GenerateVpnProfileResponder(resp) 17281 if err != nil { 17282 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", resp, "Failure responding to request") 17283 } 17284 return 17285} 17286 17287// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of a 17288// long-running operation. 17289type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct { 17290 azure.Future 17291 req *http.Request 17292} 17293 17294// Result returns the result of the asynchronous operation. 17295// If the operation has not completed it will return an error. 17296func (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { 17297 var done bool 17298 done, err = future.Done(client) 17299 if err != nil { 17300 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure") 17301 return 17302 } 17303 if !done { 17304 return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture") 17305 } 17306 if future.PollingMethod() == azure.PollingLocation { 17307 grlr, err = client.GetAdvertisedRoutesResponder(future.Response()) 17308 if err != nil { 17309 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Failure responding to request") 17310 } 17311 return 17312 } 17313 var req *http.Request 17314 var resp *http.Response 17315 if future.PollingURL() != "" { 17316 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17317 if err != nil { 17318 return 17319 } 17320 } else { 17321 req = autorest.ChangeToGet(future.req) 17322 } 17323 resp, err = autorest.SendWithSender(client, req, 17324 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17325 if err != nil { 17326 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure sending request") 17327 return 17328 } 17329 grlr, err = client.GetAdvertisedRoutesResponder(resp) 17330 if err != nil { 17331 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", resp, "Failure responding to request") 17332 } 17333 return 17334} 17335 17336// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a 17337// long-running operation. 17338type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct { 17339 azure.Future 17340 req *http.Request 17341} 17342 17343// Result returns the result of the asynchronous operation. 17344// If the operation has not completed it will return an error. 17345func (future VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) { 17346 var done bool 17347 done, err = future.Done(client) 17348 if err != nil { 17349 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure") 17350 return 17351 } 17352 if !done { 17353 return bpslr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture") 17354 } 17355 if future.PollingMethod() == azure.PollingLocation { 17356 bpslr, err = client.GetBgpPeerStatusResponder(future.Response()) 17357 if err != nil { 17358 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Failure responding to request") 17359 } 17360 return 17361 } 17362 var req *http.Request 17363 var resp *http.Response 17364 if future.PollingURL() != "" { 17365 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17366 if err != nil { 17367 return 17368 } 17369 } else { 17370 req = autorest.ChangeToGet(future.req) 17371 } 17372 resp, err = autorest.SendWithSender(client, req, 17373 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17374 if err != nil { 17375 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure sending request") 17376 return 17377 } 17378 bpslr, err = client.GetBgpPeerStatusResponder(resp) 17379 if err != nil { 17380 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", resp, "Failure responding to request") 17381 } 17382 return 17383} 17384 17385// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a 17386// long-running operation. 17387type VirtualNetworkGatewaysGetLearnedRoutesFuture struct { 17388 azure.Future 17389 req *http.Request 17390} 17391 17392// Result returns the result of the asynchronous operation. 17393// If the operation has not completed it will return an error. 17394func (future VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) { 17395 var done bool 17396 done, err = future.Done(client) 17397 if err != nil { 17398 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure") 17399 return 17400 } 17401 if !done { 17402 return grlr, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture") 17403 } 17404 if future.PollingMethod() == azure.PollingLocation { 17405 grlr, err = client.GetLearnedRoutesResponder(future.Response()) 17406 if err != nil { 17407 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Failure responding to request") 17408 } 17409 return 17410 } 17411 var req *http.Request 17412 var resp *http.Response 17413 if future.PollingURL() != "" { 17414 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17415 if err != nil { 17416 return 17417 } 17418 } else { 17419 req = autorest.ChangeToGet(future.req) 17420 } 17421 resp, err = autorest.SendWithSender(client, req, 17422 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17423 if err != nil { 17424 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure sending request") 17425 return 17426 } 17427 grlr, err = client.GetLearnedRoutesResponder(resp) 17428 if err != nil { 17429 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", resp, "Failure responding to request") 17430 } 17431 return 17432} 17433 17434// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results 17435// of a long-running operation. 17436type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { 17437 azure.Future 17438 req *http.Request 17439} 17440 17441// Result returns the result of the asynchronous operation. 17442// If the operation has not completed it will return an error. 17443func (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { 17444 var done bool 17445 done, err = future.Done(client) 17446 if err != nil { 17447 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") 17448 return 17449 } 17450 if !done { 17451 return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture") 17452 } 17453 if future.PollingMethod() == azure.PollingLocation { 17454 vcipp, err = client.GetVpnclientIpsecParametersResponder(future.Response()) 17455 if err != nil { 17456 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request") 17457 } 17458 return 17459 } 17460 var req *http.Request 17461 var resp *http.Response 17462 if future.PollingURL() != "" { 17463 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17464 if err != nil { 17465 return 17466 } 17467 } else { 17468 req = autorest.ChangeToGet(future.req) 17469 } 17470 resp, err = autorest.SendWithSender(client, req, 17471 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17472 if err != nil { 17473 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request") 17474 return 17475 } 17476 vcipp, err = client.GetVpnclientIpsecParametersResponder(resp) 17477 if err != nil { 17478 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request") 17479 } 17480 return 17481} 17482 17483// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results of 17484// a long-running operation. 17485type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct { 17486 azure.Future 17487 req *http.Request 17488} 17489 17490// Result returns the result of the asynchronous operation. 17491// If the operation has not completed it will return an error. 17492func (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) { 17493 var done bool 17494 done, err = future.Done(client) 17495 if err != nil { 17496 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure") 17497 return 17498 } 17499 if !done { 17500 return s, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture") 17501 } 17502 if future.PollingMethod() == azure.PollingLocation { 17503 s, err = client.GetVpnProfilePackageURLResponder(future.Response()) 17504 if err != nil { 17505 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Failure responding to request") 17506 } 17507 return 17508 } 17509 var req *http.Request 17510 var resp *http.Response 17511 if future.PollingURL() != "" { 17512 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17513 if err != nil { 17514 return 17515 } 17516 } else { 17517 req = autorest.ChangeToGet(future.req) 17518 } 17519 resp, err = autorest.SendWithSender(client, req, 17520 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17521 if err != nil { 17522 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure sending request") 17523 return 17524 } 17525 s, err = client.GetVpnProfilePackageURLResponder(resp) 17526 if err != nil { 17527 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", resp, "Failure responding to request") 17528 } 17529 return 17530} 17531 17532// VirtualNetworkGatewaySku virtualNetworkGatewaySku details 17533type VirtualNetworkGatewaySku struct { 17534 // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3' 17535 Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` 17536 // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3' 17537 Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` 17538 // Capacity - The capacity. 17539 Capacity *int32 `json:"capacity,omitempty"` 17540} 17541 17542// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running 17543// operation. 17544type VirtualNetworkGatewaysResetFuture struct { 17545 azure.Future 17546 req *http.Request 17547} 17548 17549// Result returns the result of the asynchronous operation. 17550// If the operation has not completed it will return an error. 17551func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 17552 var done bool 17553 done, err = future.Done(client) 17554 if err != nil { 17555 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure") 17556 return 17557 } 17558 if !done { 17559 return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture") 17560 } 17561 if future.PollingMethod() == azure.PollingLocation { 17562 vng, err = client.ResetResponder(future.Response()) 17563 if err != nil { 17564 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request") 17565 } 17566 return 17567 } 17568 var req *http.Request 17569 var resp *http.Response 17570 if future.PollingURL() != "" { 17571 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17572 if err != nil { 17573 return 17574 } 17575 } else { 17576 req = autorest.ChangeToGet(future.req) 17577 } 17578 resp, err = autorest.SendWithSender(client, req, 17579 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17580 if err != nil { 17581 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request") 17582 return 17583 } 17584 vng, err = client.ResetResponder(resp) 17585 if err != nil { 17586 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request") 17587 } 17588 return 17589} 17590 17591// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results 17592// of a long-running operation. 17593type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct { 17594 azure.Future 17595 req *http.Request 17596} 17597 17598// Result returns the result of the asynchronous operation. 17599// If the operation has not completed it will return an error. 17600func (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) { 17601 var done bool 17602 done, err = future.Done(client) 17603 if err != nil { 17604 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure") 17605 return 17606 } 17607 if !done { 17608 return vcipp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture") 17609 } 17610 if future.PollingMethod() == azure.PollingLocation { 17611 vcipp, err = client.SetVpnclientIpsecParametersResponder(future.Response()) 17612 if err != nil { 17613 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Failure responding to request") 17614 } 17615 return 17616 } 17617 var req *http.Request 17618 var resp *http.Response 17619 if future.PollingURL() != "" { 17620 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17621 if err != nil { 17622 return 17623 } 17624 } else { 17625 req = autorest.ChangeToGet(future.req) 17626 } 17627 resp, err = autorest.SendWithSender(client, req, 17628 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17629 if err != nil { 17630 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure sending request") 17631 return 17632 } 17633 vcipp, err = client.SetVpnclientIpsecParametersResponder(resp) 17634 if err != nil { 17635 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", resp, "Failure responding to request") 17636 } 17637 return 17638} 17639 17640// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 17641// long-running operation. 17642type VirtualNetworkGatewaysUpdateTagsFuture struct { 17643 azure.Future 17644 req *http.Request 17645} 17646 17647// Result returns the result of the asynchronous operation. 17648// If the operation has not completed it will return an error. 17649func (future VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) { 17650 var done bool 17651 done, err = future.Done(client) 17652 if err != nil { 17653 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") 17654 return 17655 } 17656 if !done { 17657 return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture") 17658 } 17659 if future.PollingMethod() == azure.PollingLocation { 17660 vng, err = client.UpdateTagsResponder(future.Response()) 17661 if err != nil { 17662 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 17663 } 17664 return 17665 } 17666 var req *http.Request 17667 var resp *http.Response 17668 if future.PollingURL() != "" { 17669 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 17670 if err != nil { 17671 return 17672 } 17673 } else { 17674 req = autorest.ChangeToGet(future.req) 17675 } 17676 resp, err = autorest.SendWithSender(client, req, 17677 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 17678 if err != nil { 17679 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure sending request") 17680 return 17681 } 17682 vng, err = client.UpdateTagsResponder(resp) 17683 if err != nil { 17684 err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", resp, "Failure responding to request") 17685 } 17686 return 17687} 17688 17689// VirtualNetworkListResult response for the ListVirtualNetworks API service call. 17690type VirtualNetworkListResult struct { 17691 autorest.Response `json:"-"` 17692 // Value - Gets a list of VirtualNetwork resources in a resource group. 17693 Value *[]VirtualNetwork `json:"value,omitempty"` 17694 // NextLink - The URL to get the next set of results. 17695 NextLink *string `json:"nextLink,omitempty"` 17696} 17697 17698// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values. 17699type VirtualNetworkListResultIterator struct { 17700 i int 17701 page VirtualNetworkListResultPage 17702} 17703 17704// Next advances to the next value. If there was an error making 17705// the request the iterator does not advance and the error is returned. 17706func (iter *VirtualNetworkListResultIterator) Next() error { 17707 iter.i++ 17708 if iter.i < len(iter.page.Values()) { 17709 return nil 17710 } 17711 err := iter.page.Next() 17712 if err != nil { 17713 iter.i-- 17714 return err 17715 } 17716 iter.i = 0 17717 return nil 17718} 17719 17720// NotDone returns true if the enumeration should be started or is not yet complete. 17721func (iter VirtualNetworkListResultIterator) NotDone() bool { 17722 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17723} 17724 17725// Response returns the raw server response from the last page request. 17726func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult { 17727 return iter.page.Response() 17728} 17729 17730// Value returns the current value or a zero-initialized value if the 17731// iterator has advanced beyond the end of the collection. 17732func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork { 17733 if !iter.page.NotDone() { 17734 return VirtualNetwork{} 17735 } 17736 return iter.page.Values()[iter.i] 17737} 17738 17739// IsEmpty returns true if the ListResult contains no values. 17740func (vnlr VirtualNetworkListResult) IsEmpty() bool { 17741 return vnlr.Value == nil || len(*vnlr.Value) == 0 17742} 17743 17744// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results. 17745// It returns nil if no more results exist. 17746func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) { 17747 if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 { 17748 return nil, nil 17749 } 17750 return autorest.Prepare(&http.Request{}, 17751 autorest.AsJSON(), 17752 autorest.AsGet(), 17753 autorest.WithBaseURL(to.String(vnlr.NextLink))) 17754} 17755 17756// VirtualNetworkListResultPage contains a page of VirtualNetwork values. 17757type VirtualNetworkListResultPage struct { 17758 fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error) 17759 vnlr VirtualNetworkListResult 17760} 17761 17762// Next advances to the next page of values. If there was an error making 17763// the request the page does not advance and the error is returned. 17764func (page *VirtualNetworkListResultPage) Next() error { 17765 next, err := page.fn(page.vnlr) 17766 if err != nil { 17767 return err 17768 } 17769 page.vnlr = next 17770 return nil 17771} 17772 17773// NotDone returns true if the page enumeration should be started or is not yet complete. 17774func (page VirtualNetworkListResultPage) NotDone() bool { 17775 return !page.vnlr.IsEmpty() 17776} 17777 17778// Response returns the raw server response from the last page request. 17779func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult { 17780 return page.vnlr 17781} 17782 17783// Values returns the slice of values for the current page or nil if there are no values. 17784func (page VirtualNetworkListResultPage) Values() []VirtualNetwork { 17785 if page.vnlr.IsEmpty() { 17786 return nil 17787 } 17788 return *page.vnlr.Value 17789} 17790 17791// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call. 17792type VirtualNetworkListUsageResult struct { 17793 autorest.Response `json:"-"` 17794 // Value - VirtualNetwork usage stats. 17795 Value *[]VirtualNetworkUsage `json:"value,omitempty"` 17796 // NextLink - The URL to get the next set of results. 17797 NextLink *string `json:"nextLink,omitempty"` 17798} 17799 17800// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values. 17801type VirtualNetworkListUsageResultIterator struct { 17802 i int 17803 page VirtualNetworkListUsageResultPage 17804} 17805 17806// Next advances to the next value. If there was an error making 17807// the request the iterator does not advance and the error is returned. 17808func (iter *VirtualNetworkListUsageResultIterator) Next() error { 17809 iter.i++ 17810 if iter.i < len(iter.page.Values()) { 17811 return nil 17812 } 17813 err := iter.page.Next() 17814 if err != nil { 17815 iter.i-- 17816 return err 17817 } 17818 iter.i = 0 17819 return nil 17820} 17821 17822// NotDone returns true if the enumeration should be started or is not yet complete. 17823func (iter VirtualNetworkListUsageResultIterator) NotDone() bool { 17824 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 17825} 17826 17827// Response returns the raw server response from the last page request. 17828func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult { 17829 return iter.page.Response() 17830} 17831 17832// Value returns the current value or a zero-initialized value if the 17833// iterator has advanced beyond the end of the collection. 17834func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage { 17835 if !iter.page.NotDone() { 17836 return VirtualNetworkUsage{} 17837 } 17838 return iter.page.Values()[iter.i] 17839} 17840 17841// IsEmpty returns true if the ListResult contains no values. 17842func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool { 17843 return vnlur.Value == nil || len(*vnlur.Value) == 0 17844} 17845 17846// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. 17847// It returns nil if no more results exist. 17848func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer() (*http.Request, error) { 17849 if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 { 17850 return nil, nil 17851 } 17852 return autorest.Prepare(&http.Request{}, 17853 autorest.AsJSON(), 17854 autorest.AsGet(), 17855 autorest.WithBaseURL(to.String(vnlur.NextLink))) 17856} 17857 17858// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values. 17859type VirtualNetworkListUsageResultPage struct { 17860 fn func(VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error) 17861 vnlur VirtualNetworkListUsageResult 17862} 17863 17864// Next advances to the next page of values. If there was an error making 17865// the request the page does not advance and the error is returned. 17866func (page *VirtualNetworkListUsageResultPage) Next() error { 17867 next, err := page.fn(page.vnlur) 17868 if err != nil { 17869 return err 17870 } 17871 page.vnlur = next 17872 return nil 17873} 17874 17875// NotDone returns true if the page enumeration should be started or is not yet complete. 17876func (page VirtualNetworkListUsageResultPage) NotDone() bool { 17877 return !page.vnlur.IsEmpty() 17878} 17879 17880// Response returns the raw server response from the last page request. 17881func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult { 17882 return page.vnlur 17883} 17884 17885// Values returns the slice of values for the current page or nil if there are no values. 17886func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage { 17887 if page.vnlur.IsEmpty() { 17888 return nil 17889 } 17890 return *page.vnlur.Value 17891} 17892 17893// VirtualNetworkPeering peerings in a virtual network resource. 17894type VirtualNetworkPeering struct { 17895 autorest.Response `json:"-"` 17896 // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. 17897 *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` 17898 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 17899 Name *string `json:"name,omitempty"` 17900 // Etag - A unique read-only string that changes whenever the resource is updated. 17901 Etag *string `json:"etag,omitempty"` 17902 // ID - Resource ID. 17903 ID *string `json:"id,omitempty"` 17904} 17905 17906// MarshalJSON is the custom marshaler for VirtualNetworkPeering. 17907func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { 17908 objectMap := make(map[string]interface{}) 17909 if vnp.VirtualNetworkPeeringPropertiesFormat != nil { 17910 objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat 17911 } 17912 if vnp.Name != nil { 17913 objectMap["name"] = vnp.Name 17914 } 17915 if vnp.Etag != nil { 17916 objectMap["etag"] = vnp.Etag 17917 } 17918 if vnp.ID != nil { 17919 objectMap["id"] = vnp.ID 17920 } 17921 return json.Marshal(objectMap) 17922} 17923 17924// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct. 17925func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error { 17926 var m map[string]*json.RawMessage 17927 err := json.Unmarshal(body, &m) 17928 if err != nil { 17929 return err 17930 } 17931 for k, v := range m { 17932 switch k { 17933 case "properties": 17934 if v != nil { 17935 var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat 17936 err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat) 17937 if err != nil { 17938 return err 17939 } 17940 vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat 17941 } 17942 case "name": 17943 if v != nil { 17944 var name string 17945 err = json.Unmarshal(*v, &name) 17946 if err != nil { 17947 return err 17948 } 17949 vnp.Name = &name 17950 } 17951 case "etag": 17952 if v != nil { 17953 var etag string 17954 err = json.Unmarshal(*v, &etag) 17955 if err != nil { 17956 return err 17957 } 17958 vnp.Etag = &etag 17959 } 17960 case "id": 17961 if v != nil { 17962 var ID string 17963 err = json.Unmarshal(*v, &ID) 17964 if err != nil { 17965 return err 17966 } 17967 vnp.ID = &ID 17968 } 17969 } 17970 } 17971 17972 return nil 17973} 17974 17975// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong to 17976// a virtual network. 17977type VirtualNetworkPeeringListResult struct { 17978 autorest.Response `json:"-"` 17979 // Value - The peerings in a virtual network. 17980 Value *[]VirtualNetworkPeering `json:"value,omitempty"` 17981 // NextLink - The URL to get the next set of results. 17982 NextLink *string `json:"nextLink,omitempty"` 17983} 17984 17985// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering values. 17986type VirtualNetworkPeeringListResultIterator struct { 17987 i int 17988 page VirtualNetworkPeeringListResultPage 17989} 17990 17991// Next advances to the next value. If there was an error making 17992// the request the iterator does not advance and the error is returned. 17993func (iter *VirtualNetworkPeeringListResultIterator) Next() error { 17994 iter.i++ 17995 if iter.i < len(iter.page.Values()) { 17996 return nil 17997 } 17998 err := iter.page.Next() 17999 if err != nil { 18000 iter.i-- 18001 return err 18002 } 18003 iter.i = 0 18004 return nil 18005} 18006 18007// NotDone returns true if the enumeration should be started or is not yet complete. 18008func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool { 18009 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 18010} 18011 18012// Response returns the raw server response from the last page request. 18013func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult { 18014 return iter.page.Response() 18015} 18016 18017// Value returns the current value or a zero-initialized value if the 18018// iterator has advanced beyond the end of the collection. 18019func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering { 18020 if !iter.page.NotDone() { 18021 return VirtualNetworkPeering{} 18022 } 18023 return iter.page.Values()[iter.i] 18024} 18025 18026// IsEmpty returns true if the ListResult contains no values. 18027func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool { 18028 return vnplr.Value == nil || len(*vnplr.Value) == 0 18029} 18030 18031// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results. 18032// It returns nil if no more results exist. 18033func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer() (*http.Request, error) { 18034 if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 { 18035 return nil, nil 18036 } 18037 return autorest.Prepare(&http.Request{}, 18038 autorest.AsJSON(), 18039 autorest.AsGet(), 18040 autorest.WithBaseURL(to.String(vnplr.NextLink))) 18041} 18042 18043// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values. 18044type VirtualNetworkPeeringListResultPage struct { 18045 fn func(VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error) 18046 vnplr VirtualNetworkPeeringListResult 18047} 18048 18049// Next advances to the next page of values. If there was an error making 18050// the request the page does not advance and the error is returned. 18051func (page *VirtualNetworkPeeringListResultPage) Next() error { 18052 next, err := page.fn(page.vnplr) 18053 if err != nil { 18054 return err 18055 } 18056 page.vnplr = next 18057 return nil 18058} 18059 18060// NotDone returns true if the page enumeration should be started or is not yet complete. 18061func (page VirtualNetworkPeeringListResultPage) NotDone() bool { 18062 return !page.vnplr.IsEmpty() 18063} 18064 18065// Response returns the raw server response from the last page request. 18066func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult { 18067 return page.vnplr 18068} 18069 18070// Values returns the slice of values for the current page or nil if there are no values. 18071func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering { 18072 if page.vnplr.IsEmpty() { 18073 return nil 18074 } 18075 return *page.vnplr.Value 18076} 18077 18078// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. 18079type VirtualNetworkPeeringPropertiesFormat struct { 18080 // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space. 18081 AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` 18082 // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed. 18083 AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` 18084 // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. 18085 AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` 18086 // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. 18087 UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` 18088 // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). 18089 RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` 18090 // RemoteAddressSpace - The reference of the remote virtual network address space. 18091 RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` 18092 // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' 18093 PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` 18094 // ProvisioningState - The provisioning state of the resource. 18095 ProvisioningState *string `json:"provisioningState,omitempty"` 18096} 18097 18098// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 18099// long-running operation. 18100type VirtualNetworkPeeringsCreateOrUpdateFuture struct { 18101 azure.Future 18102 req *http.Request 18103} 18104 18105// Result returns the result of the asynchronous operation. 18106// If the operation has not completed it will return an error. 18107func (future VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) { 18108 var done bool 18109 done, err = future.Done(client) 18110 if err != nil { 18111 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 18112 return 18113 } 18114 if !done { 18115 return vnp, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture") 18116 } 18117 if future.PollingMethod() == azure.PollingLocation { 18118 vnp, err = client.CreateOrUpdateResponder(future.Response()) 18119 if err != nil { 18120 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 18121 } 18122 return 18123 } 18124 var req *http.Request 18125 var resp *http.Response 18126 if future.PollingURL() != "" { 18127 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18128 if err != nil { 18129 return 18130 } 18131 } else { 18132 req = autorest.ChangeToGet(future.req) 18133 } 18134 resp, err = autorest.SendWithSender(client, req, 18135 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18136 if err != nil { 18137 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request") 18138 return 18139 } 18140 vnp, err = client.CreateOrUpdateResponder(resp) 18141 if err != nil { 18142 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 18143 } 18144 return 18145} 18146 18147// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 18148// operation. 18149type VirtualNetworkPeeringsDeleteFuture struct { 18150 azure.Future 18151 req *http.Request 18152} 18153 18154// Result returns the result of the asynchronous operation. 18155// If the operation has not completed it will return an error. 18156func (future VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) { 18157 var done bool 18158 done, err = future.Done(client) 18159 if err != nil { 18160 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") 18161 return 18162 } 18163 if !done { 18164 return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture") 18165 } 18166 if future.PollingMethod() == azure.PollingLocation { 18167 ar, err = client.DeleteResponder(future.Response()) 18168 if err != nil { 18169 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request") 18170 } 18171 return 18172 } 18173 var req *http.Request 18174 var resp *http.Response 18175 if future.PollingURL() != "" { 18176 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18177 if err != nil { 18178 return 18179 } 18180 } else { 18181 req = autorest.ChangeToGet(future.req) 18182 } 18183 resp, err = autorest.SendWithSender(client, req, 18184 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18185 if err != nil { 18186 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure sending request") 18187 return 18188 } 18189 ar, err = client.DeleteResponder(resp) 18190 if err != nil { 18191 err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", resp, "Failure responding to request") 18192 } 18193 return 18194} 18195 18196// VirtualNetworkPropertiesFormat properties of the virtual network. 18197type VirtualNetworkPropertiesFormat struct { 18198 // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets. 18199 AddressSpace *AddressSpace `json:"addressSpace,omitempty"` 18200 // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. 18201 DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` 18202 // Subnets - A list of subnets in a Virtual Network. 18203 Subnets *[]Subnet `json:"subnets,omitempty"` 18204 // VirtualNetworkPeerings - A list of peerings in a Virtual Network. 18205 VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` 18206 // ResourceGUID - The resourceGuid property of the Virtual Network resource. 18207 ResourceGUID *string `json:"resourceGuid,omitempty"` 18208 // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 18209 ProvisioningState *string `json:"provisioningState,omitempty"` 18210 // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. 18211 EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` 18212 // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network. 18213 EnableVMProtection *bool `json:"enableVmProtection,omitempty"` 18214 // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. 18215 DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` 18216} 18217 18218// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 18219// operation. 18220type VirtualNetworksCreateOrUpdateFuture struct { 18221 azure.Future 18222 req *http.Request 18223} 18224 18225// Result returns the result of the asynchronous operation. 18226// If the operation has not completed it will return an error. 18227func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { 18228 var done bool 18229 done, err = future.Done(client) 18230 if err != nil { 18231 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 18232 return 18233 } 18234 if !done { 18235 return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture") 18236 } 18237 if future.PollingMethod() == azure.PollingLocation { 18238 vn, err = client.CreateOrUpdateResponder(future.Response()) 18239 if err != nil { 18240 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request") 18241 } 18242 return 18243 } 18244 var req *http.Request 18245 var resp *http.Response 18246 if future.PollingURL() != "" { 18247 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18248 if err != nil { 18249 return 18250 } 18251 } else { 18252 req = autorest.ChangeToGet(future.req) 18253 } 18254 resp, err = autorest.SendWithSender(client, req, 18255 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18256 if err != nil { 18257 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request") 18258 return 18259 } 18260 vn, err = client.CreateOrUpdateResponder(resp) 18261 if err != nil { 18262 err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request") 18263 } 18264 return 18265} 18266 18267// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 18268// operation. 18269type VirtualNetworksDeleteFuture struct { 18270 azure.Future 18271 req *http.Request 18272} 18273 18274// Result returns the result of the asynchronous operation. 18275// If the operation has not completed it will return an error. 18276func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) { 18277 var done bool 18278 done, err = future.Done(client) 18279 if err != nil { 18280 err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure") 18281 return 18282 } 18283 if !done { 18284 return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture") 18285 } 18286 if future.PollingMethod() == azure.PollingLocation { 18287 ar, err = client.DeleteResponder(future.Response()) 18288 if err != nil { 18289 err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request") 18290 } 18291 return 18292 } 18293 var req *http.Request 18294 var resp *http.Response 18295 if future.PollingURL() != "" { 18296 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18297 if err != nil { 18298 return 18299 } 18300 } else { 18301 req = autorest.ChangeToGet(future.req) 18302 } 18303 resp, err = autorest.SendWithSender(client, req, 18304 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18305 if err != nil { 18306 err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request") 18307 return 18308 } 18309 ar, err = client.DeleteResponder(resp) 18310 if err != nil { 18311 err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request") 18312 } 18313 return 18314} 18315 18316// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running 18317// operation. 18318type VirtualNetworksUpdateTagsFuture struct { 18319 azure.Future 18320 req *http.Request 18321} 18322 18323// Result returns the result of the asynchronous operation. 18324// If the operation has not completed it will return an error. 18325func (future VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { 18326 var done bool 18327 done, err = future.Done(client) 18328 if err != nil { 18329 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") 18330 return 18331 } 18332 if !done { 18333 return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") 18334 } 18335 if future.PollingMethod() == azure.PollingLocation { 18336 vn, err = client.UpdateTagsResponder(future.Response()) 18337 if err != nil { 18338 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Failure responding to request") 18339 } 18340 return 18341 } 18342 var req *http.Request 18343 var resp *http.Response 18344 if future.PollingURL() != "" { 18345 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18346 if err != nil { 18347 return 18348 } 18349 } else { 18350 req = autorest.ChangeToGet(future.req) 18351 } 18352 resp, err = autorest.SendWithSender(client, req, 18353 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18354 if err != nil { 18355 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure sending request") 18356 return 18357 } 18358 vn, err = client.UpdateTagsResponder(resp) 18359 if err != nil { 18360 err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", resp, "Failure responding to request") 18361 } 18362 return 18363} 18364 18365// VirtualNetworkUsage usage details for subnet. 18366type VirtualNetworkUsage struct { 18367 // CurrentValue - Indicates number of IPs used from the Subnet. 18368 CurrentValue *float64 `json:"currentValue,omitempty"` 18369 // ID - Subnet identifier. 18370 ID *string `json:"id,omitempty"` 18371 // Limit - Indicates the size of the subnet. 18372 Limit *float64 `json:"limit,omitempty"` 18373 // Name - The name containing common and localized value for usage. 18374 Name *VirtualNetworkUsageName `json:"name,omitempty"` 18375 // Unit - Usage units. Returns 'Count' 18376 Unit *string `json:"unit,omitempty"` 18377} 18378 18379// VirtualNetworkUsageName usage strings container. 18380type VirtualNetworkUsageName struct { 18381 // LocalizedValue - Localized subnet size and usage string. 18382 LocalizedValue *string `json:"localizedValue,omitempty"` 18383 // Value - Subnet size and usage string. 18384 Value *string `json:"value,omitempty"` 18385} 18386 18387// VpnClientConfiguration vpnClientConfiguration for P2S client. 18388type VpnClientConfiguration struct { 18389 // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. 18390 VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` 18391 // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway. 18392 VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` 18393 // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway. 18394 VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` 18395 // VpnClientProtocols - VpnClientProtocols for Virtual network gateway. 18396 VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` 18397 // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client. 18398 VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` 18399 // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection. 18400 RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` 18401 // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. 18402 RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` 18403} 18404 18405// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. 18406type VpnClientIPsecParameters struct { 18407 autorest.Response `json:"-"` 18408 // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. 18409 SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` 18410 // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. 18411 SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` 18412 // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' 18413 IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` 18414 // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' 18415 IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` 18416 // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' 18417 IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` 18418 // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' 18419 IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` 18420 // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' 18421 DhGroup DhGroup `json:"dhGroup,omitempty"` 18422 // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' 18423 PfsGroup PfsGroup `json:"pfsGroup,omitempty"` 18424} 18425 18426// VpnClientParameters vpn Client Parameters for package generation 18427type VpnClientParameters struct { 18428 // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86' 18429 ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` 18430 // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' 18431 AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` 18432 // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. 18433 RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` 18434 // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS. 18435 ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` 18436} 18437 18438// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway. 18439type VpnClientRevokedCertificate struct { 18440 // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. 18441 *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` 18442 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 18443 Name *string `json:"name,omitempty"` 18444 // Etag - A unique read-only string that changes whenever the resource is updated. 18445 Etag *string `json:"etag,omitempty"` 18446 // ID - Resource ID. 18447 ID *string `json:"id,omitempty"` 18448} 18449 18450// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate. 18451func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { 18452 objectMap := make(map[string]interface{}) 18453 if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil { 18454 objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat 18455 } 18456 if vcrc.Name != nil { 18457 objectMap["name"] = vcrc.Name 18458 } 18459 if vcrc.Etag != nil { 18460 objectMap["etag"] = vcrc.Etag 18461 } 18462 if vcrc.ID != nil { 18463 objectMap["id"] = vcrc.ID 18464 } 18465 return json.Marshal(objectMap) 18466} 18467 18468// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct. 18469func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { 18470 var m map[string]*json.RawMessage 18471 err := json.Unmarshal(body, &m) 18472 if err != nil { 18473 return err 18474 } 18475 for k, v := range m { 18476 switch k { 18477 case "properties": 18478 if v != nil { 18479 var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat 18480 err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat) 18481 if err != nil { 18482 return err 18483 } 18484 vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat 18485 } 18486 case "name": 18487 if v != nil { 18488 var name string 18489 err = json.Unmarshal(*v, &name) 18490 if err != nil { 18491 return err 18492 } 18493 vcrc.Name = &name 18494 } 18495 case "etag": 18496 if v != nil { 18497 var etag string 18498 err = json.Unmarshal(*v, &etag) 18499 if err != nil { 18500 return err 18501 } 18502 vcrc.Etag = &etag 18503 } 18504 case "id": 18505 if v != nil { 18506 var ID string 18507 err = json.Unmarshal(*v, &ID) 18508 if err != nil { 18509 return err 18510 } 18511 vcrc.ID = &ID 18512 } 18513 } 18514 } 18515 18516 return nil 18517} 18518 18519// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network 18520// gateway. 18521type VpnClientRevokedCertificatePropertiesFormat struct { 18522 // Thumbprint - The revoked VPN client certificate thumbprint. 18523 Thumbprint *string `json:"thumbprint,omitempty"` 18524 // ProvisioningState - The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 18525 ProvisioningState *string `json:"provisioningState,omitempty"` 18526} 18527 18528// VpnClientRootCertificate VPN client root certificate of virtual network gateway 18529type VpnClientRootCertificate struct { 18530 // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. 18531 *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` 18532 // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. 18533 Name *string `json:"name,omitempty"` 18534 // Etag - A unique read-only string that changes whenever the resource is updated. 18535 Etag *string `json:"etag,omitempty"` 18536 // ID - Resource ID. 18537 ID *string `json:"id,omitempty"` 18538} 18539 18540// MarshalJSON is the custom marshaler for VpnClientRootCertificate. 18541func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { 18542 objectMap := make(map[string]interface{}) 18543 if vcrc.VpnClientRootCertificatePropertiesFormat != nil { 18544 objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat 18545 } 18546 if vcrc.Name != nil { 18547 objectMap["name"] = vcrc.Name 18548 } 18549 if vcrc.Etag != nil { 18550 objectMap["etag"] = vcrc.Etag 18551 } 18552 if vcrc.ID != nil { 18553 objectMap["id"] = vcrc.ID 18554 } 18555 return json.Marshal(objectMap) 18556} 18557 18558// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct. 18559func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { 18560 var m map[string]*json.RawMessage 18561 err := json.Unmarshal(body, &m) 18562 if err != nil { 18563 return err 18564 } 18565 for k, v := range m { 18566 switch k { 18567 case "properties": 18568 if v != nil { 18569 var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat 18570 err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat) 18571 if err != nil { 18572 return err 18573 } 18574 vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat 18575 } 18576 case "name": 18577 if v != nil { 18578 var name string 18579 err = json.Unmarshal(*v, &name) 18580 if err != nil { 18581 return err 18582 } 18583 vcrc.Name = &name 18584 } 18585 case "etag": 18586 if v != nil { 18587 var etag string 18588 err = json.Unmarshal(*v, &etag) 18589 if err != nil { 18590 return err 18591 } 18592 vcrc.Etag = &etag 18593 } 18594 case "id": 18595 if v != nil { 18596 var ID string 18597 err = json.Unmarshal(*v, &ID) 18598 if err != nil { 18599 return err 18600 } 18601 vcrc.ID = &ID 18602 } 18603 } 18604 } 18605 18606 return nil 18607} 18608 18609// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway 18610type VpnClientRootCertificatePropertiesFormat struct { 18611 // PublicCertData - The certificate public data. 18612 PublicCertData *string `json:"publicCertData,omitempty"` 18613 // ProvisioningState - The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. 18614 ProvisioningState *string `json:"provisioningState,omitempty"` 18615} 18616 18617// VpnDeviceScriptParameters vpn device configuration script generation parameters 18618type VpnDeviceScriptParameters struct { 18619 // Vendor - The vendor for the vpn device. 18620 Vendor *string `json:"vendor,omitempty"` 18621 // DeviceFamily - The device family for the vpn device. 18622 DeviceFamily *string `json:"deviceFamily,omitempty"` 18623 // FirmwareVersion - The firmware version for the vpn device. 18624 FirmwareVersion *string `json:"firmwareVersion,omitempty"` 18625} 18626 18627// Watcher network watcher in a resource group. 18628type Watcher struct { 18629 autorest.Response `json:"-"` 18630 // Etag - A unique read-only string that changes whenever the resource is updated. 18631 Etag *string `json:"etag,omitempty"` 18632 *WatcherPropertiesFormat `json:"properties,omitempty"` 18633 // ID - Resource ID. 18634 ID *string `json:"id,omitempty"` 18635 // Name - Resource name. 18636 Name *string `json:"name,omitempty"` 18637 // Type - Resource type. 18638 Type *string `json:"type,omitempty"` 18639 // Location - Resource location. 18640 Location *string `json:"location,omitempty"` 18641 // Tags - Resource tags. 18642 Tags map[string]*string `json:"tags"` 18643} 18644 18645// MarshalJSON is the custom marshaler for Watcher. 18646func (w Watcher) MarshalJSON() ([]byte, error) { 18647 objectMap := make(map[string]interface{}) 18648 if w.Etag != nil { 18649 objectMap["etag"] = w.Etag 18650 } 18651 if w.WatcherPropertiesFormat != nil { 18652 objectMap["properties"] = w.WatcherPropertiesFormat 18653 } 18654 if w.ID != nil { 18655 objectMap["id"] = w.ID 18656 } 18657 if w.Name != nil { 18658 objectMap["name"] = w.Name 18659 } 18660 if w.Type != nil { 18661 objectMap["type"] = w.Type 18662 } 18663 if w.Location != nil { 18664 objectMap["location"] = w.Location 18665 } 18666 if w.Tags != nil { 18667 objectMap["tags"] = w.Tags 18668 } 18669 return json.Marshal(objectMap) 18670} 18671 18672// UnmarshalJSON is the custom unmarshaler for Watcher struct. 18673func (w *Watcher) UnmarshalJSON(body []byte) error { 18674 var m map[string]*json.RawMessage 18675 err := json.Unmarshal(body, &m) 18676 if err != nil { 18677 return err 18678 } 18679 for k, v := range m { 18680 switch k { 18681 case "etag": 18682 if v != nil { 18683 var etag string 18684 err = json.Unmarshal(*v, &etag) 18685 if err != nil { 18686 return err 18687 } 18688 w.Etag = &etag 18689 } 18690 case "properties": 18691 if v != nil { 18692 var watcherPropertiesFormat WatcherPropertiesFormat 18693 err = json.Unmarshal(*v, &watcherPropertiesFormat) 18694 if err != nil { 18695 return err 18696 } 18697 w.WatcherPropertiesFormat = &watcherPropertiesFormat 18698 } 18699 case "id": 18700 if v != nil { 18701 var ID string 18702 err = json.Unmarshal(*v, &ID) 18703 if err != nil { 18704 return err 18705 } 18706 w.ID = &ID 18707 } 18708 case "name": 18709 if v != nil { 18710 var name string 18711 err = json.Unmarshal(*v, &name) 18712 if err != nil { 18713 return err 18714 } 18715 w.Name = &name 18716 } 18717 case "type": 18718 if v != nil { 18719 var typeVar string 18720 err = json.Unmarshal(*v, &typeVar) 18721 if err != nil { 18722 return err 18723 } 18724 w.Type = &typeVar 18725 } 18726 case "location": 18727 if v != nil { 18728 var location string 18729 err = json.Unmarshal(*v, &location) 18730 if err != nil { 18731 return err 18732 } 18733 w.Location = &location 18734 } 18735 case "tags": 18736 if v != nil { 18737 var tags map[string]*string 18738 err = json.Unmarshal(*v, &tags) 18739 if err != nil { 18740 return err 18741 } 18742 w.Tags = tags 18743 } 18744 } 18745 } 18746 18747 return nil 18748} 18749 18750// WatcherListResult list of network watcher resources. 18751type WatcherListResult struct { 18752 autorest.Response `json:"-"` 18753 Value *[]Watcher `json:"value,omitempty"` 18754} 18755 18756// WatcherPropertiesFormat the network watcher properties. 18757type WatcherPropertiesFormat struct { 18758 // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' 18759 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 18760} 18761 18762// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a long-running 18763// operation. 18764type WatchersCheckConnectivityFuture struct { 18765 azure.Future 18766 req *http.Request 18767} 18768 18769// Result returns the result of the asynchronous operation. 18770// If the operation has not completed it will return an error. 18771func (future WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) { 18772 var done bool 18773 done, err = future.Done(client) 18774 if err != nil { 18775 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure") 18776 return 18777 } 18778 if !done { 18779 return ci, azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture") 18780 } 18781 if future.PollingMethod() == azure.PollingLocation { 18782 ci, err = client.CheckConnectivityResponder(future.Response()) 18783 if err != nil { 18784 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Failure responding to request") 18785 } 18786 return 18787 } 18788 var req *http.Request 18789 var resp *http.Response 18790 if future.PollingURL() != "" { 18791 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18792 if err != nil { 18793 return 18794 } 18795 } else { 18796 req = autorest.ChangeToGet(future.req) 18797 } 18798 resp, err = autorest.SendWithSender(client, req, 18799 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18800 if err != nil { 18801 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure sending request") 18802 return 18803 } 18804 ci, err = client.CheckConnectivityResponder(resp) 18805 if err != nil { 18806 err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", resp, "Failure responding to request") 18807 } 18808 return 18809} 18810 18811// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 18812type WatchersDeleteFuture struct { 18813 azure.Future 18814 req *http.Request 18815} 18816 18817// Result returns the result of the asynchronous operation. 18818// If the operation has not completed it will return an error. 18819func (future WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) { 18820 var done bool 18821 done, err = future.Done(client) 18822 if err != nil { 18823 err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure") 18824 return 18825 } 18826 if !done { 18827 return ar, azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture") 18828 } 18829 if future.PollingMethod() == azure.PollingLocation { 18830 ar, err = client.DeleteResponder(future.Response()) 18831 if err != nil { 18832 err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Failure responding to request") 18833 } 18834 return 18835 } 18836 var req *http.Request 18837 var resp *http.Response 18838 if future.PollingURL() != "" { 18839 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18840 if err != nil { 18841 return 18842 } 18843 } else { 18844 req = autorest.ChangeToGet(future.req) 18845 } 18846 resp, err = autorest.SendWithSender(client, req, 18847 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18848 if err != nil { 18849 err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure sending request") 18850 return 18851 } 18852 ar, err = client.DeleteResponder(resp) 18853 if err != nil { 18854 err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", resp, "Failure responding to request") 18855 } 18856 return 18857} 18858 18859// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a 18860// long-running operation. 18861type WatchersGetAzureReachabilityReportFuture struct { 18862 azure.Future 18863 req *http.Request 18864} 18865 18866// Result returns the result of the asynchronous operation. 18867// If the operation has not completed it will return an error. 18868func (future WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) { 18869 var done bool 18870 done, err = future.Done(client) 18871 if err != nil { 18872 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure") 18873 return 18874 } 18875 if !done { 18876 return arr, azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture") 18877 } 18878 if future.PollingMethod() == azure.PollingLocation { 18879 arr, err = client.GetAzureReachabilityReportResponder(future.Response()) 18880 if err != nil { 18881 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Failure responding to request") 18882 } 18883 return 18884 } 18885 var req *http.Request 18886 var resp *http.Response 18887 if future.PollingURL() != "" { 18888 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18889 if err != nil { 18890 return 18891 } 18892 } else { 18893 req = autorest.ChangeToGet(future.req) 18894 } 18895 resp, err = autorest.SendWithSender(client, req, 18896 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18897 if err != nil { 18898 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure sending request") 18899 return 18900 } 18901 arr, err = client.GetAzureReachabilityReportResponder(resp) 18902 if err != nil { 18903 err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", resp, "Failure responding to request") 18904 } 18905 return 18906} 18907 18908// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a long-running 18909// operation. 18910type WatchersGetFlowLogStatusFuture struct { 18911 azure.Future 18912 req *http.Request 18913} 18914 18915// Result returns the result of the asynchronous operation. 18916// If the operation has not completed it will return an error. 18917func (future WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) { 18918 var done bool 18919 done, err = future.Done(client) 18920 if err != nil { 18921 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure") 18922 return 18923 } 18924 if !done { 18925 return fli, azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture") 18926 } 18927 if future.PollingMethod() == azure.PollingLocation { 18928 fli, err = client.GetFlowLogStatusResponder(future.Response()) 18929 if err != nil { 18930 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Failure responding to request") 18931 } 18932 return 18933 } 18934 var req *http.Request 18935 var resp *http.Response 18936 if future.PollingURL() != "" { 18937 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18938 if err != nil { 18939 return 18940 } 18941 } else { 18942 req = autorest.ChangeToGet(future.req) 18943 } 18944 resp, err = autorest.SendWithSender(client, req, 18945 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18946 if err != nil { 18947 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure sending request") 18948 return 18949 } 18950 fli, err = client.GetFlowLogStatusResponder(resp) 18951 if err != nil { 18952 err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", resp, "Failure responding to request") 18953 } 18954 return 18955} 18956 18957// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation. 18958type WatchersGetNextHopFuture struct { 18959 azure.Future 18960 req *http.Request 18961} 18962 18963// Result returns the result of the asynchronous operation. 18964// If the operation has not completed it will return an error. 18965func (future WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) { 18966 var done bool 18967 done, err = future.Done(client) 18968 if err != nil { 18969 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure") 18970 return 18971 } 18972 if !done { 18973 return nhr, azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture") 18974 } 18975 if future.PollingMethod() == azure.PollingLocation { 18976 nhr, err = client.GetNextHopResponder(future.Response()) 18977 if err != nil { 18978 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Failure responding to request") 18979 } 18980 return 18981 } 18982 var req *http.Request 18983 var resp *http.Response 18984 if future.PollingURL() != "" { 18985 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 18986 if err != nil { 18987 return 18988 } 18989 } else { 18990 req = autorest.ChangeToGet(future.req) 18991 } 18992 resp, err = autorest.SendWithSender(client, req, 18993 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 18994 if err != nil { 18995 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure sending request") 18996 return 18997 } 18998 nhr, err = client.GetNextHopResponder(resp) 18999 if err != nil { 19000 err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", resp, "Failure responding to request") 19001 } 19002 return 19003} 19004 19005// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a long-running 19006// operation. 19007type WatchersGetTroubleshootingFuture struct { 19008 azure.Future 19009 req *http.Request 19010} 19011 19012// Result returns the result of the asynchronous operation. 19013// If the operation has not completed it will return an error. 19014func (future WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) { 19015 var done bool 19016 done, err = future.Done(client) 19017 if err != nil { 19018 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure") 19019 return 19020 } 19021 if !done { 19022 return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture") 19023 } 19024 if future.PollingMethod() == azure.PollingLocation { 19025 tr, err = client.GetTroubleshootingResponder(future.Response()) 19026 if err != nil { 19027 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Failure responding to request") 19028 } 19029 return 19030 } 19031 var req *http.Request 19032 var resp *http.Response 19033 if future.PollingURL() != "" { 19034 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19035 if err != nil { 19036 return 19037 } 19038 } else { 19039 req = autorest.ChangeToGet(future.req) 19040 } 19041 resp, err = autorest.SendWithSender(client, req, 19042 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19043 if err != nil { 19044 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure sending request") 19045 return 19046 } 19047 tr, err = client.GetTroubleshootingResponder(resp) 19048 if err != nil { 19049 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", resp, "Failure responding to request") 19050 } 19051 return 19052} 19053 19054// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a 19055// long-running operation. 19056type WatchersGetTroubleshootingResultFuture struct { 19057 azure.Future 19058 req *http.Request 19059} 19060 19061// Result returns the result of the asynchronous operation. 19062// If the operation has not completed it will return an error. 19063func (future WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) { 19064 var done bool 19065 done, err = future.Done(client) 19066 if err != nil { 19067 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure") 19068 return 19069 } 19070 if !done { 19071 return tr, azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture") 19072 } 19073 if future.PollingMethod() == azure.PollingLocation { 19074 tr, err = client.GetTroubleshootingResultResponder(future.Response()) 19075 if err != nil { 19076 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Failure responding to request") 19077 } 19078 return 19079 } 19080 var req *http.Request 19081 var resp *http.Response 19082 if future.PollingURL() != "" { 19083 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19084 if err != nil { 19085 return 19086 } 19087 } else { 19088 req = autorest.ChangeToGet(future.req) 19089 } 19090 resp, err = autorest.SendWithSender(client, req, 19091 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19092 if err != nil { 19093 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure sending request") 19094 return 19095 } 19096 tr, err = client.GetTroubleshootingResultResponder(resp) 19097 if err != nil { 19098 err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", resp, "Failure responding to request") 19099 } 19100 return 19101} 19102 19103// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a long-running 19104// operation. 19105type WatchersGetVMSecurityRulesFuture struct { 19106 azure.Future 19107 req *http.Request 19108} 19109 19110// Result returns the result of the asynchronous operation. 19111// If the operation has not completed it will return an error. 19112func (future WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) { 19113 var done bool 19114 done, err = future.Done(client) 19115 if err != nil { 19116 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure") 19117 return 19118 } 19119 if !done { 19120 return sgvr, azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture") 19121 } 19122 if future.PollingMethod() == azure.PollingLocation { 19123 sgvr, err = client.GetVMSecurityRulesResponder(future.Response()) 19124 if err != nil { 19125 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Failure responding to request") 19126 } 19127 return 19128 } 19129 var req *http.Request 19130 var resp *http.Response 19131 if future.PollingURL() != "" { 19132 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19133 if err != nil { 19134 return 19135 } 19136 } else { 19137 req = autorest.ChangeToGet(future.req) 19138 } 19139 resp, err = autorest.SendWithSender(client, req, 19140 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19141 if err != nil { 19142 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure sending request") 19143 return 19144 } 19145 sgvr, err = client.GetVMSecurityRulesResponder(resp) 19146 if err != nil { 19147 err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", resp, "Failure responding to request") 19148 } 19149 return 19150} 19151 19152// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a long-running 19153// operation. 19154type WatchersListAvailableProvidersFuture struct { 19155 azure.Future 19156 req *http.Request 19157} 19158 19159// Result returns the result of the asynchronous operation. 19160// If the operation has not completed it will return an error. 19161func (future WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) { 19162 var done bool 19163 done, err = future.Done(client) 19164 if err != nil { 19165 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure") 19166 return 19167 } 19168 if !done { 19169 return apl, azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture") 19170 } 19171 if future.PollingMethod() == azure.PollingLocation { 19172 apl, err = client.ListAvailableProvidersResponder(future.Response()) 19173 if err != nil { 19174 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Failure responding to request") 19175 } 19176 return 19177 } 19178 var req *http.Request 19179 var resp *http.Response 19180 if future.PollingURL() != "" { 19181 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19182 if err != nil { 19183 return 19184 } 19185 } else { 19186 req = autorest.ChangeToGet(future.req) 19187 } 19188 resp, err = autorest.SendWithSender(client, req, 19189 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19190 if err != nil { 19191 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure sending request") 19192 return 19193 } 19194 apl, err = client.ListAvailableProvidersResponder(resp) 19195 if err != nil { 19196 err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", resp, "Failure responding to request") 19197 } 19198 return 19199} 19200 19201// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a long-running 19202// operation. 19203type WatchersSetFlowLogConfigurationFuture struct { 19204 azure.Future 19205 req *http.Request 19206} 19207 19208// Result returns the result of the asynchronous operation. 19209// If the operation has not completed it will return an error. 19210func (future WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) { 19211 var done bool 19212 done, err = future.Done(client) 19213 if err != nil { 19214 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure") 19215 return 19216 } 19217 if !done { 19218 return fli, azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture") 19219 } 19220 if future.PollingMethod() == azure.PollingLocation { 19221 fli, err = client.SetFlowLogConfigurationResponder(future.Response()) 19222 if err != nil { 19223 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Failure responding to request") 19224 } 19225 return 19226 } 19227 var req *http.Request 19228 var resp *http.Response 19229 if future.PollingURL() != "" { 19230 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19231 if err != nil { 19232 return 19233 } 19234 } else { 19235 req = autorest.ChangeToGet(future.req) 19236 } 19237 resp, err = autorest.SendWithSender(client, req, 19238 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19239 if err != nil { 19240 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure sending request") 19241 return 19242 } 19243 fli, err = client.SetFlowLogConfigurationResponder(resp) 19244 if err != nil { 19245 err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", resp, "Failure responding to request") 19246 } 19247 return 19248} 19249 19250// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation. 19251type WatchersVerifyIPFlowFuture struct { 19252 azure.Future 19253 req *http.Request 19254} 19255 19256// Result returns the result of the asynchronous operation. 19257// If the operation has not completed it will return an error. 19258func (future WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) { 19259 var done bool 19260 done, err = future.Done(client) 19261 if err != nil { 19262 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure") 19263 return 19264 } 19265 if !done { 19266 return vifr, azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture") 19267 } 19268 if future.PollingMethod() == azure.PollingLocation { 19269 vifr, err = client.VerifyIPFlowResponder(future.Response()) 19270 if err != nil { 19271 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Failure responding to request") 19272 } 19273 return 19274 } 19275 var req *http.Request 19276 var resp *http.Response 19277 if future.PollingURL() != "" { 19278 req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil) 19279 if err != nil { 19280 return 19281 } 19282 } else { 19283 req = autorest.ChangeToGet(future.req) 19284 } 19285 resp, err = autorest.SendWithSender(client, req, 19286 autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 19287 if err != nil { 19288 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure sending request") 19289 return 19290 } 19291 vifr, err = client.VerifyIPFlowResponder(resp) 19292 if err != nil { 19293 err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", resp, "Failure responding to request") 19294 } 19295 return 19296} 19297