diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb index 4ced59f048..f29ebf949f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb @@ -26,9 +26,18 @@ module Azure::ARM::Network autoload :ExpressRouteCircuits, 'generated/azure_mgmt_network/express_route_circuits.rb' autoload :ExpressRouteServiceProviders, 'generated/azure_mgmt_network/express_route_service_providers.rb' autoload :LoadBalancers, 'generated/azure_mgmt_network/load_balancers.rb' + autoload :LoadBalancerBackendAddressPools, 'generated/azure_mgmt_network/load_balancer_backend_address_pools.rb' + autoload :LoadBalancerFrontendIPConfigurations, 'generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb' + autoload :InboundNatRules, 'generated/azure_mgmt_network/inbound_nat_rules.rb' + autoload :LoadBalancerLoadBalancingRules, 'generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb' + autoload :LoadBalancerNetworkInterfaces, 'generated/azure_mgmt_network/load_balancer_network_interfaces.rb' + autoload :LoadBalancerProbes, 'generated/azure_mgmt_network/load_balancer_probes.rb' autoload :NetworkInterfaces, 'generated/azure_mgmt_network/network_interfaces.rb' + autoload :NetworkInterfaceIPConfigurations, 'generated/azure_mgmt_network/network_interface_ipconfigurations.rb' + autoload :NetworkInterfaceLoadBalancers, 'generated/azure_mgmt_network/network_interface_load_balancers.rb' autoload :NetworkSecurityGroups, 'generated/azure_mgmt_network/network_security_groups.rb' autoload :SecurityRules, 'generated/azure_mgmt_network/security_rules.rb' + autoload :DefaultSecurityRules, 'generated/azure_mgmt_network/default_security_rules.rb' autoload :NetworkWatchers, 'generated/azure_mgmt_network/network_watchers.rb' autoload :PacketCaptures, 'generated/azure_mgmt_network/packet_captures.rb' autoload :AvailablePrivateAccessServices, 'generated/azure_mgmt_network/available_private_access_services.rb' @@ -48,126 +57,134 @@ module Azure::ARM::Network autoload :NetworkManagementClient, 'generated/azure_mgmt_network/network_management_client.rb' module Models - autoload :EffectiveRoute, 'generated/azure_mgmt_network/models/effective_route.rb' - autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' - autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' - autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' - autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' - autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' - autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' - autoload :ExpressRouteCircuitsRoutesTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb' - autoload :PrivateAccessServicePropertiesFormat, 'generated/azure_mgmt_network/models/private_access_service_properties_format.rb' + autoload :EffectiveNetworkSecurityRule, 'generated/azure_mgmt_network/models/effective_network_security_rule.rb' + autoload :EffectiveNetworkSecurityGroup, 'generated/azure_mgmt_network/models/effective_network_security_group.rb' autoload :ExpressRouteCircuitRoutesTableSummary, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb' - autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' autoload :ExpressRouteCircuitsRoutesTableSummaryListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb' - autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' + autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' autoload :ExpressRouteCircuitListResult, 'generated/azure_mgmt_network/models/express_route_circuit_list_result.rb' - autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' + autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' autoload :ExpressRouteServiceProviderBandwidthsOffered, 'generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb' - autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' - autoload :RouteFilterRuleListResult, 'generated/azure_mgmt_network/models/route_filter_rule_list_result.rb' - autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' + autoload :PrivateAccessServicePropertiesFormat, 'generated/azure_mgmt_network/models/private_access_service_properties_format.rb' + autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' + autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' autoload :ExpressRouteServiceProviderListResult, 'generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb' - autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' + autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :RouteFilterRuleListResult, 'generated/azure_mgmt_network/models/route_filter_rule_list_result.rb' + autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' autoload :RouteFilterListResult, 'generated/azure_mgmt_network/models/route_filter_list_result.rb' - autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' + autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' autoload :PublicIPAddressListResult, 'generated/azure_mgmt_network/models/public_ipaddress_list_result.rb' - autoload :ApplicationGatewaySslPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb' + autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' autoload :PrivateAccessServicesListResult, 'generated/azure_mgmt_network/models/private_access_services_list_result.rb' - autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' + autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' autoload :ConnectivityInformation, 'generated/azure_mgmt_network/models/connectivity_information.rb' - autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' + autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' autoload :ConnectivityHop, 'generated/azure_mgmt_network/models/connectivity_hop.rb' - autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' - autoload :ConnectivityIssue, 'generated/azure_mgmt_network/models/connectivity_issue.rb' - autoload :ApplicationGatewayProbeHealthResponseMatch, 'generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb' + autoload :ApplicationGatewaySslPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb' autoload :LoadBalancerListResult, 'generated/azure_mgmt_network/models/load_balancer_list_result.rb' - autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' - autoload :ErrorDetails, 'generated/azure_mgmt_network/models/error_details.rb' - autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' - autoload :Error, 'generated/azure_mgmt_network/models/error.rb' + autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' + autoload :InboundNatRuleListResult, 'generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb' + autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :LoadBalancerBackendAddressPoolListResult, 'generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb' + autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :LoadBalancerFrontendIPConfigurationListResult, 'generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb' + autoload :ApplicationGatewayProbeHealthResponseMatch, 'generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb' + autoload :LoadBalancerLoadBalancingRuleListResult, 'generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb' + autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' + autoload :LoadBalancerProbeListResult, 'generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb' + autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' + autoload :NetworkInterfaceListResult, 'generated/azure_mgmt_network/models/network_interface_list_result.rb' autoload :ApplicationGatewayWebApplicationFirewallConfiguration, 'generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb' - autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_network/models/azure_async_operation_result.rb' + autoload :ErrorDetails, 'generated/azure_mgmt_network/models/error_details.rb' autoload :ApplicationGatewayListResult, 'generated/azure_mgmt_network/models/application_gateway_list_result.rb' - autoload :NetworkInterfaceListResult, 'generated/azure_mgmt_network/models/network_interface_list_result.rb' + autoload :Error, 'generated/azure_mgmt_network/models/error.rb' autoload :ApplicationGatewayFirewallRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb' - autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' + autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_network/models/azure_async_operation_result.rb' autoload :ApplicationGatewayAvailableWafRuleSetsResult, 'generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb' - autoload :EffectiveNetworkSecurityRule, 'generated/azure_mgmt_network/models/effective_network_security_rule.rb' + autoload :NetworkInterfaceIPConfigurationListResult, 'generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb' + autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' + autoload :NetworkInterfaceLoadBalancerListResult, 'generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb' + autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' autoload :Usage, 'generated/azure_mgmt_network/models/usage.rb' - autoload :EffectiveNetworkSecurityGroup, 'generated/azure_mgmt_network/models/effective_network_security_group.rb' - autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' - autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' autoload :AuthorizationListResult, 'generated/azure_mgmt_network/models/authorization_list_result.rb' - autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' + autoload :ConnectivityDestination, 'generated/azure_mgmt_network/models/connectivity_destination.rb' + autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' + autoload :ConnectivityIssue, 'generated/azure_mgmt_network/models/connectivity_issue.rb' autoload :BgpServiceCommunityListResult, 'generated/azure_mgmt_network/models/bgp_service_community_list_result.rb' - autoload :ConnectivityParameters, 'generated/azure_mgmt_network/models/connectivity_parameters.rb' - autoload :BGPCommunity, 'generated/azure_mgmt_network/models/bgpcommunity.rb' - autoload :SecurityRuleListResult, 'generated/azure_mgmt_network/models/security_rule_list_result.rb' + autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' autoload :Ipv6ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb' - autoload :NetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/network_security_group_list_result.rb' + autoload :EffectiveRoute, 'generated/azure_mgmt_network/models/effective_route.rb' autoload :ExpressRouteCircuitSku, 'generated/azure_mgmt_network/models/express_route_circuit_sku.rb' - autoload :ConnectivityDestination, 'generated/azure_mgmt_network/models/connectivity_destination.rb' - autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' - autoload :NetworkWatcherListResult, 'generated/azure_mgmt_network/models/network_watcher_list_result.rb' + autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' + autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' + autoload :SecurityRuleListResult, 'generated/azure_mgmt_network/models/security_rule_list_result.rb' + autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' + autoload :NetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/network_security_group_list_result.rb' + autoload :ExpressRouteCircuitsRoutesTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb' + autoload :ConnectivityParameters, 'generated/azure_mgmt_network/models/connectivity_parameters.rb' autoload :ConnectionSharedKey, 'generated/azure_mgmt_network/models/connection_shared_key.rb' - autoload :TopologyParameters, 'generated/azure_mgmt_network/models/topology_parameters.rb' + autoload :NetworkWatcherListResult, 'generated/azure_mgmt_network/models/network_watcher_list_result.rb' autoload :PublicIPAddressDnsSettings, 'generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb' + autoload :TopologyParameters, 'generated/azure_mgmt_network/models/topology_parameters.rb' + autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' autoload :TopologyAssociation, 'generated/azure_mgmt_network/models/topology_association.rb' - autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' - autoload :TopologyResource, 'generated/azure_mgmt_network/models/topology_resource.rb' autoload :ApplicationGatewayConnectionDraining, 'generated/azure_mgmt_network/models/application_gateway_connection_draining.rb' - autoload :Topology, 'generated/azure_mgmt_network/models/topology.rb' + autoload :TopologyResource, 'generated/azure_mgmt_network/models/topology_resource.rb' autoload :ApplicationGatewayBackendHealthPool, 'generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb' + autoload :Topology, 'generated/azure_mgmt_network/models/topology.rb' + autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' autoload :VerificationIPFlowParameters, 'generated/azure_mgmt_network/models/verification_ipflow_parameters.rb' - autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' + autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' autoload :VerificationIPFlowResult, 'generated/azure_mgmt_network/models/verification_ipflow_result.rb' - autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' autoload :NextHopParameters, 'generated/azure_mgmt_network/models/next_hop_parameters.rb' - autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' - autoload :NextHopResult, 'generated/azure_mgmt_network/models/next_hop_result.rb' autoload :ApplicationGatewayFirewallDisabledRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb' - autoload :SecurityGroupViewParameters, 'generated/azure_mgmt_network/models/security_group_view_parameters.rb' + autoload :NextHopResult, 'generated/azure_mgmt_network/models/next_hop_result.rb' autoload :ApplicationGatewayFirewallRule, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb' + autoload :SecurityGroupViewParameters, 'generated/azure_mgmt_network/models/security_group_view_parameters.rb' + autoload :SubnetListResult, 'generated/azure_mgmt_network/models/subnet_list_result.rb' autoload :NetworkInterfaceAssociation, 'generated/azure_mgmt_network/models/network_interface_association.rb' - autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' - autoload :SubnetAssociation, 'generated/azure_mgmt_network/models/subnet_association.rb' autoload :DnsNameAvailabilityResult, 'generated/azure_mgmt_network/models/dns_name_availability_result.rb' - autoload :SecurityRuleAssociations, 'generated/azure_mgmt_network/models/security_rule_associations.rb' + autoload :SubnetAssociation, 'generated/azure_mgmt_network/models/subnet_association.rb' autoload :ExpressRouteCircuitStats, 'generated/azure_mgmt_network/models/express_route_circuit_stats.rb' - autoload :SecurityGroupNetworkInterface, 'generated/azure_mgmt_network/models/security_group_network_interface.rb' + autoload :SecurityRuleAssociations, 'generated/azure_mgmt_network/models/security_rule_associations.rb' autoload :ExpressRouteCircuitPeeringListResult, 'generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb' + autoload :SecurityGroupNetworkInterface, 'generated/azure_mgmt_network/models/security_group_network_interface.rb' + autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' autoload :SecurityGroupViewResult, 'generated/azure_mgmt_network/models/security_group_view_result.rb' autoload :NetworkInterfaceDnsSettings, 'generated/azure_mgmt_network/models/network_interface_dns_settings.rb' autoload :PacketCaptureStorageLocation, 'generated/azure_mgmt_network/models/packet_capture_storage_location.rb' - autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :GatewayReference, 'generated/azure_mgmt_network/models/gateway_reference.rb' autoload :PacketCaptureFilter, 'generated/azure_mgmt_network/models/packet_capture_filter.rb' autoload :ApplicationGatewayBackendHealthServer, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb' autoload :PacketCaptureParameters, 'generated/azure_mgmt_network/models/packet_capture_parameters.rb' - autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' autoload :PacketCapture, 'generated/azure_mgmt_network/models/packet_capture.rb' - autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' + autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' autoload :PacketCaptureResult, 'generated/azure_mgmt_network/models/packet_capture_result.rb' - autoload :SubnetListResult, 'generated/azure_mgmt_network/models/subnet_list_result.rb' + autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' autoload :PacketCaptureListResult, 'generated/azure_mgmt_network/models/packet_capture_list_result.rb' autoload :ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb' autoload :PacketCaptureQueryStatusResult, 'generated/azure_mgmt_network/models/packet_capture_query_status_result.rb' autoload :ExpressRouteCircuitServiceProviderProperties, 'generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb' autoload :TroubleshootingParameters, 'generated/azure_mgmt_network/models/troubleshooting_parameters.rb' - autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' + autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' autoload :QueryTroubleshootingParameters, 'generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb' - autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' + autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' autoload :TroubleshootingRecommendedActions, 'generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb' - autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' + autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' autoload :TroubleshootingDetails, 'generated/azure_mgmt_network/models/troubleshooting_details.rb' - autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' + autoload :BGPCommunity, 'generated/azure_mgmt_network/models/bgpcommunity.rb' autoload :TroubleshootingResult, 'generated/azure_mgmt_network/models/troubleshooting_result.rb' - autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' + autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' autoload :RetentionPolicyParameters, 'generated/azure_mgmt_network/models/retention_policy_parameters.rb' - autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' + autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' autoload :FlowLogStatusParameters, 'generated/azure_mgmt_network/models/flow_log_status_parameters.rb' - autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' + autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' autoload :FlowLogInformation, 'generated/azure_mgmt_network/models/flow_log_information.rb' + autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' + autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' autoload :BackendAddressPool, 'generated/azure_mgmt_network/models/backend_address_pool.rb' autoload :InboundNatRule, 'generated/azure_mgmt_network/models/inbound_nat_rule.rb' autoload :SecurityRule, 'generated/azure_mgmt_network/models/security_rule.rb' @@ -220,8 +237,8 @@ module Models autoload :VpnClientRootCertificate, 'generated/azure_mgmt_network/models/vpn_client_root_certificate.rb' autoload :VpnClientRevokedCertificate, 'generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb' autoload :VirtualNetworkGateway, 'generated/azure_mgmt_network/models/virtual_network_gateway.rb' - autoload :LocalNetworkGateway, 'generated/azure_mgmt_network/models/local_network_gateway.rb' autoload :VirtualNetworkGatewayConnection, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb' + autoload :LocalNetworkGateway, 'generated/azure_mgmt_network/models/local_network_gateway.rb' autoload :TransportProtocol, 'generated/azure_mgmt_network/models/transport_protocol.rb' autoload :IPAllocationMethod, 'generated/azure_mgmt_network/models/ipallocation_method.rb' autoload :IPVersion, 'generated/azure_mgmt_network/models/ipversion.rb' @@ -253,6 +270,7 @@ module Models autoload :LoadDistribution, 'generated/azure_mgmt_network/models/load_distribution.rb' autoload :ProbeProtocol, 'generated/azure_mgmt_network/models/probe_protocol.rb' autoload :NetworkOperationStatus, 'generated/azure_mgmt_network/models/network_operation_status.rb' + autoload :EffectiveSecurityRuleProtocol, 'generated/azure_mgmt_network/models/effective_security_rule_protocol.rb' autoload :EffectiveRouteSource, 'generated/azure_mgmt_network/models/effective_route_source.rb' autoload :EffectiveRouteState, 'generated/azure_mgmt_network/models/effective_route_state.rb' autoload :ProvisioningState, 'generated/azure_mgmt_network/models/provisioning_state.rb' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb new file mode 100644 index 0000000000..14541ece50 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb @@ -0,0 +1,330 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class DefaultSecurityRules + include MsRestAzure + + # + # Creates and initializes a new instance of the DefaultSecurityRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_security_group_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_security_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil) + list_async(resource_group_name, network_security_group_name, custom_headers).value! + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_security_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRule] operation results. + # + def get(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + response = get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + fail ArgumentError, 'default_security_rule_name is nil' if default_security_rule_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'defaultSecurityRuleName' => default_security_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, network_security_group_name, custom_headers = nil) + response = list_async(resource_group_name, network_security_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb new file mode 100644 index 0000000000..98112811a2 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb @@ -0,0 +1,616 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class InboundNatRules + include MsRestAzure + + # + # Creates and initializes a new instance of the InboundNatRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def get(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version,'$expand' => expand}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 204 || status_code == 202 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def begin_create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + fail ArgumentError, 'inbound_nat_rule_parameters is nil' if inbound_nat_rule_parameters.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + request_content = @client.serialize(request_mapper, inbound_nat_rule_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb new file mode 100644 index 0000000000..a5feeda6c1 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerBackendAddressPools + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerBackendAddressPools class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendAddressPool] operation results. + # + def get(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'backend_address_pool_name is nil' if backend_address_pool_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'backendAddressPoolName' => backend_address_pool_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::BackendAddressPool.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerBackendAddressPoolListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerBackendAddressPoolListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb new file mode 100644 index 0000000000..9117e24274 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerFrontendIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerFrontendIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FrontendIPConfiguration] operation results. + # + def get(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'frontend_ipconfiguration_name is nil' if frontend_ipconfiguration_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'frontendIPConfigurationName' => frontend_ipconfiguration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::FrontendIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] which provide lazy + # access to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb new file mode 100644 index 0000000000..9fd73a0e34 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerLoadBalancingRules + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerLoadBalancingRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancingRule] operation results. + # + def get(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'load_balancing_rule_name is nil' if load_balancing_rule_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'loadBalancingRuleName' => load_balancing_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancingRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerLoadBalancingRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerLoadBalancingRuleListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb new file mode 100644 index 0000000000..2f9d3c76bf --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb @@ -0,0 +1,225 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerNetworkInterfaces + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerNetworkInterfaces class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets associated load balancer network interfaces. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets associated load balancer network interfaces. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets associated load balancer network interfaces. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets associated load balancer network interfaces. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb new file mode 100644 index 0000000000..cdd2191d99 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerProbes + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerProbes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Probe] operation results. + # + def get(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'probe_name is nil' if probe_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'probeName' => probe_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::Probe.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerProbeListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerProbeListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb index e768016067..a3f5f6f385 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb @@ -16,7 +16,8 @@ class EffectiveNetworkSecurityGroup # @return [SubResource] The ID of network security group that is applied. attr_accessor :network_security_group - # @return [EffectiveNetworkSecurityGroupAssociation] + # @return [EffectiveNetworkSecurityGroupAssociation] Associated + # resources. attr_accessor :association # @return [Array] A collection of effective diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb index 4fc86d544d..2d7641517f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb @@ -20,6 +20,38 @@ class EffectiveNetworkSecurityGroupListResult # @return [String] The URL to get the next set of results. attr_accessor :next_link + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [EffectiveNetworkSecurityGroupListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end # # Mapper for EffectiveNetworkSecurityGroupListResult class as Ruby Hash. @@ -50,6 +82,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb index 8077f76556..932eb82ab0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb @@ -17,9 +17,9 @@ class EffectiveNetworkSecurityRule # (if created by the user). attr_accessor :name - # @return [SecurityRuleProtocol] The network protocol this rule applies - # to. Possible values are: 'Tcp', 'Udp', and '*'. Possible values - # include: 'Tcp', 'Udp', '*' + # @return [EffectiveSecurityRuleProtocol] The network protocol this rule + # applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible + # values include: 'Tcp', 'Udp', 'All' attr_accessor :protocol # @return [String] The source port or range. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb index e8b55d4c70..4917f736e2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb @@ -19,6 +19,37 @@ class EffectiveRouteListResult # @return [String] The URL to get the next set of results. attr_accessor :next_link + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [EffectiveRouteListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end # # Mapper for EffectiveRouteListResult class as Ruby Hash. @@ -49,6 +80,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb new file mode 100644 index 0000000000..847a2dfe48 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for EffectiveSecurityRuleProtocol + # + module EffectiveSecurityRuleProtocol + Tcp = "Tcp" + Udp = "Udp" + All = "All" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_reference.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_reference.rb new file mode 100644 index 0000000000..c9967133e1 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/gateway_reference.rb @@ -0,0 +1,46 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + # + class GatewayReference + + include MsRestAzure + + include MsRest::JSONable + # @return [String] The ID of VirtualNetworkGateway or LocalNetworkGateway + # resource. + attr_accessor :id + + + # + # Mapper for GatewayReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'GatewayReference', + type: { + name: 'Composite', + class_name: 'GatewayReference', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb index 5ac97b68a4..88dd8bfdc9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb @@ -19,7 +19,7 @@ class InboundNatRule < MsRestAzure::SubResource # @return [NetworkInterfaceIPConfiguration] 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 backed IP. + # the backend IP. attr_accessor :backend_ipconfiguration # @return [TransportProtocol] The transport protocol for the endpoint. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb new file mode 100644 index 0000000000..3ba6a3e355 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListInboundNatRule API service call. + # + class InboundNatRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of inbound nat rules in a load + # balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [InboundNatRuleListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for InboundNatRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'InboundNatRuleListResult', + type: { + name: 'Composite', + class_name: 'InboundNatRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'InboundNatRuleElementType', + type: { + name: 'Composite', + class_name: 'InboundNatRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb index b7f6fb58a1..7e681a7af0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb @@ -6,7 +6,7 @@ module Azure::ARM::Network module Models # - # IPConfiguration + # IP configuration # class IPConfiguration < MsRestAzure::SubResource diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb new file mode 100644 index 0000000000..10c3c5aa76 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListBackendAddressPool API service call. + # + class LoadBalancerBackendAddressPoolListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of backend address pools in + # a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerBackendAddressPoolListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerBackendAddressPoolListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerBackendAddressPoolListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerBackendAddressPoolListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackendAddressPoolElementType', + type: { + name: 'Composite', + class_name: 'BackendAddressPool' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..1dd92773dd --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListFrontendIPConfiguration API service call. + # + class LoadBalancerFrontendIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of frontend IP + # configurations in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerFrontendIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerFrontendIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerFrontendIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FrontendIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'FrontendIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb index e200c10c9a..6b1bf22328 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb new file mode 100644 index 0000000000..4ee4f781e8 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListLoadBalancingRule API service call. + # + class LoadBalancerLoadBalancingRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancing rules in a + # load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerLoadBalancingRuleListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerLoadBalancingRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerLoadBalancingRuleListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerLoadBalancingRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancingRuleElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancingRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb new file mode 100644 index 0000000000..4e25c489fe --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb @@ -0,0 +1,95 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListProbe API service call. + # + class LoadBalancerProbeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of probes in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerProbeListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerProbeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerProbeListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerProbeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProbeElementType', + type: { + name: 'Composite', + class_name: 'Probe' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb index 768f5b11e7..886807c60f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb @@ -6,7 +6,7 @@ module Azure::ARM::Network module Models # - # A loag balancing rule for a load balancer. + # A load balancing rule for a load balancer. # class LoadBalancingRule < MsRestAzure::SubResource diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb index 35213fe6ee..7a3ef1e816 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb index bdf6f54709..b4a6470bb8 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb @@ -25,7 +25,7 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # LoadBalancerInboundNatRules. attr_accessor :load_balancer_inbound_nat_rules - # @return [String] + # @return [String] Private IP address of the IP configuration. attr_accessor :private_ipaddress # @return [IPAllocationMethod] Defines how a private IP address is @@ -39,17 +39,20 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # Possible values include: 'IPv4', 'IPv6' attr_accessor :private_ipaddress_version - # @return [Subnet] + # @return [Subnet] Subnet bound to the IP configuration. attr_accessor :subnet # @return [Boolean] Gets whether this is a primary customer address on # the network interface. attr_accessor :primary - # @return [PublicIPAddress] + # @return [PublicIPAddress] Public IP address bound to the IP + # configuration. attr_accessor :public_ipaddress - # @return [String] + # @return [String] The provisioning state of the network interface IP + # configuration. Possible values are: 'Updating', 'Deleting', and + # 'Failed'. attr_accessor :provisioning_state # @return [String] The name of the resource that is unique within a diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..74edecad0a --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of ip + # configurations. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceIPConfigurationListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for NetworkInterfaceIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb index 3631658947..89a6555c4d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb new file mode 100644 index 0000000000..69fe60e924 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceLoadBalancerListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancers. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceLoadBalancerListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for NetworkInterfaceLoadBalancerListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceLoadBalancerListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceLoadBalancerListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancerElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancer' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb index aa86809ef1..fe5732283f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb @@ -22,14 +22,16 @@ class PublicIPAddress < MsRestAzure::Resource # 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' attr_accessor :public_ipaddress_version - # @return [IPConfiguration] + # @return [IPConfiguration] The IP configuration associated with the + # public IP address. attr_accessor :ip_configuration # @return [PublicIPAddressDnsSettings] The FQDN of the DNS record # associated with the public IP address. attr_accessor :dns_settings - # @return [String] + # @return [String] The IP address associated with the public IP address + # resource. attr_accessor :ip_address # @return [Integer] The idle timeout of the public IP address. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb index 4185c531c5..f77fa35c4a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb @@ -45,9 +45,15 @@ class SecurityRule < MsRestAzure::SubResource attr_accessor :destination_address_prefix # @return [Array] The destination address prefixes. CIDR or - # destination IP rangees. + # destination IP ranges. attr_accessor :destination_address_prefixes + # @return [Array] The source port ranges. + attr_accessor :source_port_ranges + + # @return [Array] The destination port ranges. + attr_accessor :destination_port_ranges + # @return [SecurityRuleAccess] The network traffic is allowed or denied. # Possible values are: 'Allow' and 'Deny'. Possible values include: # 'Allow', 'Deny' @@ -167,6 +173,34 @@ def self.mapper() } } }, + source_port_ranges: { + required: false, + serialized_name: 'properties.sourcePortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + destination_port_ranges: { + required: false, + serialized_name: 'properties.destinationPortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, access: { required: true, serialized_name: 'properties.access', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb index 6ec37c0b9d..86e95a951c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb @@ -52,14 +52,6 @@ class VirtualNetworkGateway < MsRestAzure::Resource # @return [BgpSettings] Virtual network gateway's BGP speaker settings. attr_accessor :bgp_settings - # @return [String] The radius server address property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_server - - # @return [String] The radius secret property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_secret - # @return [String] The resource GUID property of the # VirtualNetworkGateway resource. attr_accessor :resource_guid @@ -204,20 +196,6 @@ def self.mapper() class_name: 'BgpSettings' } }, - radius_server: { - required: false, - serialized_name: 'properties.radiusServer', - type: { - name: 'String' - } - }, - radius_secret: { - required: false, - serialized_name: 'properties.radiusSecret', - type: { - name: 'String' - } - }, resource_guid: { required: false, serialized_name: 'properties.resourceGuid', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb index c6ed76e26d..81a75257dd 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb @@ -16,13 +16,16 @@ class VirtualNetworkGatewayConnection < MsRestAzure::Resource # @return [String] The authorizationKey. attr_accessor :authorization_key - # @return [VirtualNetworkGateway] + # @return [GatewayReference] The reference to virtual network gateway + # resource. attr_accessor :virtual_network_gateway1 - # @return [VirtualNetworkGateway] + # @return [GatewayReference] The reference to virtual network gateway + # resource. attr_accessor :virtual_network_gateway2 - # @return [LocalNetworkGateway] + # @return [GatewayReference] The reference to local network gateway + # resource. attr_accessor :local_network_gateway2 # @return [VirtualNetworkGatewayConnectionType] Gateway connection type. @@ -148,7 +151,7 @@ def self.mapper() serialized_name: 'properties.virtualNetworkGateway1', type: { name: 'Composite', - class_name: 'VirtualNetworkGateway' + class_name: 'GatewayReference' } }, virtual_network_gateway2: { @@ -156,7 +159,7 @@ def self.mapper() serialized_name: 'properties.virtualNetworkGateway2', type: { name: 'Composite', - class_name: 'VirtualNetworkGateway' + class_name: 'GatewayReference' } }, local_network_gateway2: { @@ -164,7 +167,7 @@ def self.mapper() serialized_name: 'properties.localNetworkGateway2', type: { name: 'Composite', - class_name: 'LocalNetworkGateway' + class_name: 'GatewayReference' } }, connection_type: { diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb index 9104d1410b..a34d44f03e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb @@ -84,6 +84,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb index bcea63eb67..2d094c29b0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb index 8f4347460a..023d0b85e4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb @@ -29,6 +29,14 @@ class VpnClientConfiguration # network gateway. attr_accessor :vpn_client_protocols + # @return [String] The radius server address property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_address + + # @return [String] The radius secret property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_secret + # # Mapper for VpnClientConfiguration class as Ruby Hash. @@ -93,6 +101,20 @@ def self.mapper() } } } + }, + radius_server_address: { + required: false, + serialized_name: 'radiusServerAddress', + type: { + name: 'String' + } + }, + radius_server_secret: { + required: false, + serialized_name: 'radiusServerSecret', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb new file mode 100644 index 0000000000..0773d3c7c0 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class NetworkInterfaceIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfiguration] operation results. + # + def get(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + response = get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + fail ArgumentError, 'ip_configuration_name is nil' if ip_configuration_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'ipConfigurationName' => ip_configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfigurationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfigurationListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb new file mode 100644 index 0000000000..cabe6923c2 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb @@ -0,0 +1,225 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class NetworkInterfaceLoadBalancers + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceLoadBalancers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceLoadBalancerListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceLoadBalancerListResult] which provide lazy access to + # pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb index 73d79fdb86..7524aaa7e3 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb @@ -377,11 +377,32 @@ def list_async(resource_group_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveRouteListResult] operation results. + # @return [Array] which provide lazy access to pages of the + # response. # def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) response = get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + get_effective_route_table_next_async(next_page_link, custom_headers) + end + page + end + end + # + # Gets all route tables applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) + first_page = get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -419,11 +440,32 @@ def get_effective_route_table_async(resource_group_name, network_interface_name, # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # @return [Array] which provide lazy access to + # pages of the response. # def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) response = list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_effective_network_security_groups_next_async(next_page_link, custom_headers) + end + page + end + end + # + # Gets all network security groups applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -958,11 +1000,11 @@ def begin_create_or_update_async(resource_group_name, network_interface_name, pa # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveRouteListResult] operation results. + # @return [Array] operation results. # def begin_get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) - response = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + first_page = begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -1049,11 +1091,11 @@ def begin_get_effective_route_table_async(resource_group_name, network_interface # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # @return [Array] operation results. # def begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) - response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + first_page = begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -1306,6 +1348,90 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] operation results. + # + def get_effective_route_table_next(next_page_link, custom_headers = nil) + response = get_effective_route_table_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def get_effective_route_table_next_async(next_page_link, custom_headers = nil) + # Send request + promise = begin_get_effective_route_table_next_async(next_page_link, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::EffectiveRouteListResult.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # + def list_effective_network_security_groups_next(next_page_link, custom_headers = nil) + response = list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) + # Send request + promise = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::EffectiveNetworkSecurityGroupListResult.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # Gets information about all network interfaces in a virtual machine in a # virtual machine scale set. @@ -1483,6 +1609,180 @@ def list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, promise.execute end + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] operation results. + # + def begin_get_effective_route_table_next(next_page_link, custom_headers = nil) + response = begin_get_effective_route_table_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_get_effective_route_table_next_with_http_info(next_page_link, custom_headers = nil) + begin_get_effective_route_table_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_get_effective_route_table_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::EffectiveRouteListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # + def begin_list_effective_network_security_groups_next(next_page_link, custom_headers = nil) + response = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_list_effective_network_security_groups_next_with_http_info(next_page_link, custom_headers = nil) + begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::EffectiveNetworkSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all network interfaces in a subscription. # @@ -1572,5 +1872,49 @@ def list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_nam end end + # + # Gets all route tables applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] which provide lazy access to pages of the + # response. + # + def begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + begin_get_effective_route_table_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all network security groups applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] which provide lazy access + # to pages of the response. + # + def begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb index 870dc97ff4..93de93dfa2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb @@ -52,15 +52,46 @@ class NetworkManagementClient < MsRestAzure::AzureServiceClient # @return [LoadBalancers] load_balancers attr_reader :load_balancers + # @return [LoadBalancerBackendAddressPools] + # load_balancer_backend_address_pools + attr_reader :load_balancer_backend_address_pools + + # @return [LoadBalancerFrontendIPConfigurations] + # load_balancer_frontend_ipconfigurations + attr_reader :load_balancer_frontend_ipconfigurations + + # @return [InboundNatRules] inbound_nat_rules + attr_reader :inbound_nat_rules + + # @return [LoadBalancerLoadBalancingRules] + # load_balancer_load_balancing_rules + attr_reader :load_balancer_load_balancing_rules + + # @return [LoadBalancerNetworkInterfaces] load_balancer_network_interfaces + attr_reader :load_balancer_network_interfaces + + # @return [LoadBalancerProbes] load_balancer_probes + attr_reader :load_balancer_probes + # @return [NetworkInterfaces] network_interfaces attr_reader :network_interfaces + # @return [NetworkInterfaceIPConfigurations] + # network_interface_ipconfigurations + attr_reader :network_interface_ipconfigurations + + # @return [NetworkInterfaceLoadBalancers] network_interface_load_balancers + attr_reader :network_interface_load_balancers + # @return [NetworkSecurityGroups] network_security_groups attr_reader :network_security_groups # @return [SecurityRules] security_rules attr_reader :security_rules + # @return [DefaultSecurityRules] default_security_rules + attr_reader :default_security_rules + # @return [NetworkWatchers] network_watchers attr_reader :network_watchers @@ -130,9 +161,18 @@ def initialize(credentials = nil, base_url = nil, options = nil) @express_route_circuits = ExpressRouteCircuits.new(self) @express_route_service_providers = ExpressRouteServiceProviders.new(self) @load_balancers = LoadBalancers.new(self) + @load_balancer_backend_address_pools = LoadBalancerBackendAddressPools.new(self) + @load_balancer_frontend_ipconfigurations = LoadBalancerFrontendIPConfigurations.new(self) + @inbound_nat_rules = InboundNatRules.new(self) + @load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRules.new(self) + @load_balancer_network_interfaces = LoadBalancerNetworkInterfaces.new(self) + @load_balancer_probes = LoadBalancerProbes.new(self) @network_interfaces = NetworkInterfaces.new(self) + @network_interface_ipconfigurations = NetworkInterfaceIPConfigurations.new(self) + @network_interface_load_balancers = NetworkInterfaceLoadBalancers.new(self) @network_security_groups = NetworkSecurityGroups.new(self) @security_rules = SecurityRules.new(self) + @default_security_rules = DefaultSecurityRules.new(self) @network_watchers = NetworkWatchers.new(self) @packet_captures = PacketCaptures.new(self) @available_private_access_services = AvailablePrivateAccessServices.new(self) diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb index 3e2a713113..46eb5c7b04 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb @@ -290,6 +290,100 @@ def list_async(resource_group_name, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? + api_version = '2017-06-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Resets the primary of the virtual network gateway in the specified resource # group. @@ -1513,6 +1607,93 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualNetworkGatewayConnectionListResult] operation results. + # + def list_connections_next(next_page_link, custom_headers = nil) + response = list_connections_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_connections_next_with_http_info(next_page_link, custom_headers = nil) + list_connections_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_connections_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayConnectionListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all virtual network gateways by resource group. # @@ -1534,5 +1715,28 @@ def list_as_lazy(resource_group_name, custom_headers = nil) end end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualNetworkGatewayConnectionListResult] which provide lazy access + # to pages of the response. + # + def list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_connections_next_async(next_page_link, custom_headers) + end + page + end + end + end end